Extract doc-comment on plugin functions.
This commit is contained in:
18
codegen/ui_tests/rhai_fn_duplicate_attr.rs
Normal file
18
codegen/ui_tests/rhai_fn_duplicate_attr.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use rhai::plugin::*;
|
||||
|
||||
#[export_module]
|
||||
pub mod test_module {
|
||||
#[rhai_fn(name = "test")]
|
||||
#[rhai_fn(pure)]
|
||||
pub fn test_fn(input: Point) -> bool {
|
||||
input.x > input.y
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if test_module::test_fn(n) {
|
||||
println!("yes");
|
||||
} else {
|
||||
println!("no");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user