blob: 5f7fd00cb0b0ff78d2284be527a81838c09f2bf2 [file] [log] [blame]
error: future cannot be sent between threads safely
--> tests/ui/consider-restricting.rs:16:49
|
16 | async fn publish<T: IntoUrl>(&self, url: T) {}
| ^^ future created by async block is not `Send`
|
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send`
--> tests/ui/consider-restricting.rs:16:41
|
16 | async fn publish<T: IntoUrl>(&self, url: T) {}
| ^^^ has type `T` which is not `Send`
= note: required for the cast from `Pin<Box<[async block@$DIR/tests/ui/consider-restricting.rs:16:49: 16:51]>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
help: consider further restricting this bound
|
16 | async fn publish<T: IntoUrl + std::marker::Send>(&self, url: T) {}
| +++++++++++++++++++
error: future cannot be sent between threads safely
--> tests/ui/consider-restricting.rs:23:40
|
23 | async fn publish<T>(&self, url: T) {}
| ^^ future created by async block is not `Send`
|
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send`
--> tests/ui/consider-restricting.rs:23:32
|
23 | async fn publish<T>(&self, url: T) {}
| ^^^ has type `T` which is not `Send`
= note: required for the cast from `Pin<Box<[async block@$DIR/tests/ui/consider-restricting.rs:23:40: 23:42]>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
help: consider further restricting this bound
|
23 | async fn publish<T + std::marker::Send>(&self, url: T) {}
| +++++++++++++++++++