error[E0277]: `T` cannot be sent between threads safely
--> src/main.rs:11:11
|
11 | t.test2().await;
| ^^^^^ `T` cannot be sent between threads safely
|
help: consider further restricting this bound
|
9 | fn test<T: Test + 'static + Send>(mut t: T) {
| ^^^^^^
Here is the example trait:
and this usage compiles:
but this one doesn't
here the compiler error: