diff options
Diffstat (limited to 'tests/ui/send-not-implemented.stderr')
-rw-r--r-- | tests/ui/send-not-implemented.stderr | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/ui/send-not-implemented.stderr b/tests/ui/send-not-implemented.stderr index b8aedfd..7152b98 100644 --- a/tests/ui/send-not-implemented.stderr +++ b/tests/ui/send-not-implemented.stderr @@ -9,8 +9,7 @@ error: future cannot be sent between threads safely 12 | | } | |_____^ future created by async block is not `Send` | - = help: within `[async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6]`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` - = note: consider using `std::sync::Arc<MutexGuard<'_, ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html> + = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6}`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` note: future is not `Send` as this value is used across an await --> tests/ui/send-not-implemented.rs:11:13 | @@ -18,9 +17,7 @@ note: future is not `Send` as this value is used across an await | ------ has type `MutexGuard<'_, ()>` which is not `Send` 11 | f().await; | ^^^^^ await occurs here, with `_guard` maybe used later -12 | } - | - `_guard` is later dropped here - = note: required for the cast from `Pin<Box<[async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6]>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>` + = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:8:26: 12:6}>>` to `Pin<Box<dyn Future<Output = ()> + Send>>` error: future cannot be sent between threads safely --> tests/ui/send-not-implemented.rs:14:38 @@ -34,8 +31,7 @@ error: future cannot be sent between threads safely 19 | | } | |_____^ future created by async block is not `Send` | - = help: within `[async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6]`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` - = note: consider using `std::sync::Arc<MutexGuard<'_, ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html> + = help: within `{async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6}`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` note: future is not `Send` as this value is used across an await --> tests/ui/send-not-implemented.rs:17:13 | @@ -43,7 +39,4 @@ note: future is not `Send` as this value is used across an await | ------ has type `MutexGuard<'_, ()>` which is not `Send` 17 | f().await; | ^^^^^ await occurs here, with `_guard` maybe used later -18 | true -19 | } - | - `_guard` is later dropped here - = note: required for the cast from `Pin<Box<[async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6]>>` to `Pin<Box<(dyn Future<Output = bool> + Send + 'async_trait)>>` + = note: required for the cast from `Pin<Box<{async block@$DIR/tests/ui/send-not-implemented.rs:14:38: 19:6}>>` to `Pin<Box<dyn Future<Output = bool> + Send>>` |