rhai/codegen/ui_tests/rhai_fn_non_clonable_return.stderr

20 lines
850 B
Plaintext
Raw Permalink Normal View History

2020-09-08 23:04:04 +02:00
error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
2023-03-15 01:27:02 +01:00
--> 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 {
| ^^^^^^^^^^^ the trait `Clone` is not implemented for `NonClonable`
|
2021-10-20 09:34:21 +02:00
note: required by a bound in `rhai::Dynamic::from`
2023-03-15 01:27:02 +01:00
--> $WORKSPACE/src/types/dynamic.rs
|
| pub fn from<T: Variant + Clone>(value: T) -> Self {
| ^^^^^ required by this bound in `Dynamic::from`
= note: this error originates in the attribute macro `export_fn` (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)]`
|
2023-06-15 05:06:14 +02:00
3 + #[derive(Clone)]
4 | struct NonClonable {
2022-04-06 11:48:34 +02:00
|