error[E0277]: `(dyn Any + 'static)` cannot be sent between threads safely
--> tests/errors/not_send_sync.rs:8:21
|
8 | std::thread::spawn(move || {
| _____------------------_^
| | |
| | required by a bound introduced by this call
9 | | let _ = mylist.iter();
10 | | });
| |_____^ `(dyn Any + 'static)` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `(dyn Any + 'static)`
= note: required for `DynList<(dyn Any + 'static)>` to implement `Send`
note: required because it's used within this closure
--> tests/errors/not_send_sync.rs:8:21
|
8 | std::thread::spawn(move || {
| ^^^^^^^
note: required by a bound in `spawn`
--> $RUST/std/src/thread/functions.rs
|
| pub fn spawn<F, T>(f: F) -> JoinHandle<T>
| ----- required by a bound in this function
...
| F: Send + 'static,
| ^^^^ required by this bound in `spawn`