|
| 1 | +error: future cannot be sent between threads safely |
| 2 | + --> tests/ui/consider-restricting.rs:16:49 |
| 3 | + | |
| 4 | +16 | async fn publish<T: IntoUrl>(&self, url: T) {} |
| 5 | + | ^^ future created by async block is not `Send` |
| 6 | + | |
| 7 | +note: captured value is not `Send` |
| 8 | + --> tests/ui/consider-restricting.rs:16:41 |
| 9 | + | |
| 10 | +16 | async fn publish<T: IntoUrl>(&self, url: T) {} |
| 11 | + | ^^^ has type `T` which is not `Send` |
| 12 | + = note: required for the cast to the object type `dyn Future<Output = ()> + Send` |
| 13 | +help: consider further restricting this bound |
| 14 | + | |
| 15 | +16 | async fn publish<T + std::marker::Send: IntoUrl>(&self, url: T) {} |
| 16 | + | +++++++++++++++++++ |
| 17 | + |
| 18 | +error: future cannot be sent between threads safely |
| 19 | + --> tests/ui/consider-restricting.rs:23:40 |
| 20 | + | |
| 21 | +23 | async fn publish<T>(&self, url: T) {} |
| 22 | + | ^^ future created by async block is not `Send` |
| 23 | + | |
| 24 | +note: captured value is not `Send` |
| 25 | + --> tests/ui/consider-restricting.rs:23:32 |
| 26 | + | |
| 27 | +23 | async fn publish<T>(&self, url: T) {} |
| 28 | + | ^^^ has type `T` which is not `Send` |
| 29 | + = note: required for the cast to the object type `dyn Future<Output = ()> + Send` |
| 30 | +help: consider further restricting this bound |
| 31 | + | |
| 32 | +23 | async fn publish<T + std::marker::Send>(&self, url: T) {} |
| 33 | + | +++++++++++++++++++ |
0 commit comments