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
error[E0277]: the size for values of type `dyn Engine` cannot be known at compilation time
--> src/bin/main.rs:36:33
|
36 | let shared_atom = Atom::new(engine);
| ^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `std::marker::Sized` is not implemented for `dyn Engine`
= note: required because of the requirements on the impl of `atom::IntoRawPtr` for `std::sync::Arc<dyn Engine>`
= note: required by `atom::Atom::<P>::new`
error[E0277]: the size for values of type `dyn Engine` cannot be known at compilation time
--> src/bin/main.rs:36:23
|
36 | let shared_atom = Atom::new(engine);
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
:::~/.cargo/registry/src/github.com-1ecc6299db9ec823/atom-0.4.0/src/lib.rs:29:8
|
29 | P: IntoRawPtr + FromRawPtr,
| ---------- required by this bound in `atom::Atom`
|
= help: the trait `std::marker::Sized` is not implemented for `dyn Engine`
= note: required because of the requirements on the impl of `atom::IntoRawPtr` for `std::sync::Arc<dyn Engine>`
error: aborting due to 2 previous errors; 2 warnings emitted
For more information about this error, try `rustc --explain E0277`.
error: could not compile `foo`.
To learn more, run the command again with --verbose.
The text was updated successfully, but these errors were encountered:
jiacai2050
changed the title
can not use Arc<dyn trait> with atom
can not use Arc<dyn trait> with atom :sad:
Nov 10, 2020
jiacai2050
changed the title
can not use Arc<dyn trait> with atom :sad:
can not use Arc<dyn trait> with atom
Nov 10, 2020
Demo
The text was updated successfully, but these errors were encountered: