You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behaviour
The code compiles without issue.
Actual behaviour
The compiler throws this error:
error[E0277]: the trait bound `{closure@src/main.rs:8:10: 8:13}: InstanceFunction<_, Plain>` is not satisfied
--> src/main.rs:8:10
|
8 | #[derive(Any)]
| ^^^ the trait `InstanceFunction<_, Plain>` is not implemented for closure `{closure@src/main.rs:8:10: 8:13}`
9 | struct MyStruct {
10 | / #[rune(get)]
11 | | dvec: VecDeque<i64>,
| |_______________________- required by a bound introduced by this call
|
note: required by a bound in `rune::Module::field_function`
--> /home/RDuhen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rune-0.13.2/src/module/module.rs:1603:12
|
1595 | pub fn field_function<N, F, A>(
| -------------- required by a bound in this associated function
...
1603 | F: InstanceFunction<A, Plain>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Module::field_function`
Note
Another error message I have not been able to reproduce said something along the lines of "VecDeque is missing a Rune clone implementation", which could be what's preventing passing VecDeques to a Rune VM.
The text was updated successfully, but these errors were encountered:
Ah, using rune::alloc::VecDeque leads to the Clone error I couldn't get again.
error[E0277]: the trait bound `rune::alloc::VecDeque<i64>:Clone` is not satisfied
--> src/main.rs:8:10
|
8 | #[derive(Any)]
| ^^^ the trait `Clone` is not implemented for `rune::alloc::VecDeque<i64>`
|
= note: this error originates in the derive macro `Any` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `{closure@src/main.rs:8:10:8:13}:InstanceFunction<_,Plain>` is not satisfied
--> src/main.rs:8:10
|
8 | #[derive(Any)]
| ^^^ the trait `InstanceFunction<_,Plain>` is not implemented for closure `{closure@src/main.rs:8:10:8:13}`
9 | struct MyStruct{10 | / #[rune(get)]11 | | dvec: rune::alloc::VecDeque<i64>,
| |____________________________________- required by a bound introduced by this call
|
note: required by a bound in `rune::Module::field_function`
--> /home/RDuhen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rune-0.13.2/src/module/module.rs:1603:12
|
1595 | pub fn field_function<N,F,A>(
| -------------- required by a bound in this associated function
...
1603 | F:InstanceFunction<A,Plain>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Module::field_function`
Attempt
Expected behaviour
The code compiles without issue.
Actual behaviour
The compiler throws this error:
Note
Another error message I have not been able to reproduce said something along the lines of "
VecDeque
is missing a Runeclone
implementation", which could be what's preventing passingVecDeque
s to a Rune VM.The text was updated successfully, but these errors were encountered: