Fix macro hygene.

This commit is contained in:
Stephen Chung
2022-03-18 17:51:04 +08:00
parent d01a6d428f
commit 6546eae95f
5 changed files with 23 additions and 13 deletions

View File

@@ -1,9 +1,12 @@
error[E0599]: `bool` is not an iterator
--> ui_tests/export_fn_raw_return.rs:10:33
|
9 | #[export_fn(return_raw)]
| ------------------------ in this procedural macro expansion
10 | pub fn test_fn(input: Point) -> bool {
| ^^^^ `bool` is not an iterator
|
= note: the following trait bounds were not satisfied:
`bool: std::iter::Iterator`
which is required by `&mut bool: std::iter::Iterator`
= note: this error originates in the attribute macro `export_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@@ -1,9 +1,13 @@
error[E0599]: `bool` is not an iterator
--> ui_tests/export_mod_raw_return.rs:12:33
|
9 | #[export_module]
| ---------------- in this procedural macro expansion
...
12 | pub fn test_fn(input: Point) -> bool {
| ^^^^ `bool` is not an iterator
|
= note: the following trait bounds were not satisfied:
`bool: std::iter::Iterator`
which is required by `&mut bool: std::iter::Iterator`
= note: this error originates in the attribute macro `export_module` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@@ -1,14 +1,14 @@
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
--> ui_tests/rhai_fn_non_clonable_return.rs:11:8
--> ui_tests/rhai_fn_non_clonable_return.rs:11:31
|
10 | #[export_fn]
| ------------ in this procedural macro expansion
11 | pub fn test_fn(input: f32) -> NonClonable {
| ^^^^^^^^^^^^^^^^^^^^^^^-----------
| | |
| | required by a bound introduced by this call
| the trait `Clone` is not implemented for `NonClonable`
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
note: required by a bound in `rhai::Dynamic::from`
--> $WORKSPACE/src/types/dynamic.rs
|
| pub fn from<T: Variant + Clone>(value: T) -> Self {
| ^^^^^ required by this bound in `rhai::Dynamic::from`
= note: this error originates in the attribute macro `export_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@@ -1,14 +1,15 @@
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
--> ui_tests/rhai_mod_non_clonable_return.rs:12:12
--> ui_tests/rhai_mod_non_clonable_return.rs:12:35
|
10 | #[export_module]
| ---------------- in this procedural macro expansion
11 | pub mod test_mod {
12 | pub fn test_fn(input: f32) -> NonClonable {
| ^^^^^^^^^^^^^^^^^^^^^^^-----------
| | |
| | required by a bound introduced by this call
| the trait `Clone` is not implemented for `NonClonable`
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
note: required by a bound in `rhai::Dynamic::from`
--> $WORKSPACE/src/types/dynamic.rs
|
| pub fn from<T: Variant + Clone>(value: T) -> Self {
| ^^^^^ required by this bound in `rhai::Dynamic::from`
= note: this error originates in the attribute macro `export_module` (in Nightly builds, run with -Z macro-backtrace for more info)