2020-09-08 23:04:04 +02:00
|
|
|
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
|
2022-03-18 10:51:04 +01:00
|
|
|
--> ui_tests/rhai_mod_non_clonable_return.rs:12:35
|
2021-06-07 05:54:10 +02:00
|
|
|
|
|
2022-03-18 10:51:04 +01:00
|
|
|
10 | #[export_module]
|
|
|
|
| ---------------- in this procedural macro expansion
|
|
|
|
11 | pub mod test_mod {
|
2021-06-07 05:54:10 +02:00
|
|
|
12 | pub fn test_fn(input: f32) -> NonClonable {
|
2022-03-18 10:51:04 +01:00
|
|
|
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
2021-06-07 05:54:10 +02:00
|
|
|
|
|
2021-10-20 09:34:21 +02:00
|
|
|
note: required by a bound in `rhai::Dynamic::from`
|
2021-11-13 15:47:01 +01:00
|
|
|
--> $WORKSPACE/src/types/dynamic.rs
|
2021-06-07 05:54:10 +02:00
|
|
|
|
|
2022-01-02 14:54:21 +01:00
|
|
|
| pub fn from<T: Variant + Clone>(value: T) -> Self {
|
2021-10-20 09:34:21 +02:00
|
|
|
| ^^^^^ required by this bound in `rhai::Dynamic::from`
|
2022-03-18 10:51:04 +01:00
|
|
|
= note: this error originates in the attribute macro `export_module` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2022-04-06 11:48:34 +02:00
|
|
|
help: consider annotating `NonClonable` with `#[derive(Clone)]`
|
|
|
|
|
|
|
|
|
3 | #[derive(Clone)]
|
|
|
|
|
|