-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VecDeque
can't be sent through Rune
#693
Labels
enhancement
New feature or request
Comments
I think it's just lacking You'd also be encouraged to use |
Ah, using 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` |
Hmm. We should really be using TryClone and not Clone in the macro that builds the getter. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: