Fix tests.

This commit is contained in:
Stephen Chung 2022-03-18 17:11:52 +08:00
parent 61ef115ecb
commit d01a6d428f
3 changed files with 7 additions and 1 deletions

View File

@ -264,7 +264,7 @@ impl Module {
// NB: sub-modules must have their new items for exporting generated in depth-first order
// to avoid issues caused by re-parsing them
let inner_modules = sub_modules
.drain(..)
.into_iter()
.try_fold::<_, _, Result<_, syn::Error>>(Vec::new(), |mut acc, m| {
acc.push(m.generate_inner()?);
Ok(acc)

View File

@ -1,6 +1,8 @@
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
--> ui_tests/non_clonable.rs:11:23
|
10 | #[export_fn]
| ------------ in this procedural macro expansion
11 | pub fn test_fn(input: NonClonable) -> bool {
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
@ -9,3 +11,4 @@ note: required by a bound in `rhai::Dynamic::cast`
|
| pub fn cast<T: Any + Clone>(self) -> T {
| ^^^^^ required by this bound in `rhai::Dynamic::cast`
= note: this error originates in the attribute macro `export_fn` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,6 +1,8 @@
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
--> ui_tests/non_clonable_second.rs:11:27
|
10 | #[export_fn]
| ------------ in this procedural macro expansion
11 | pub fn test_fn(a: u32, b: NonClonable) -> bool {
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
@ -9,3 +11,4 @@ note: required by a bound in `rhai::Dynamic::cast`
|
| pub fn cast<T: Any + Clone>(self) -> T {
| ^^^^^ required by this bound in `rhai::Dynamic::cast`
= note: this error originates in the attribute macro `export_fn` (in Nightly builds, run with -Z macro-backtrace for more info)