rust/src/test/ui/async-await/issues/issue-67893.stderr

25 lines
1.2 KiB
Plaintext
Raw Normal View History

error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely
2020-04-18 22:20:49 -05:00
--> $DIR/issue-67893.rs:9:5
|
LL | fn g(_: impl Send) {}
| ---- required by this bound in `g`
...
LL | g(issue_67893::run())
| ^ `MutexGuard<'_, ()>` cannot be sent between threads safely
|
2020-04-18 22:20:49 -05:00
::: $DIR/auxiliary/issue_67893.rs:7:20
|
LL | pub async fn run() {
| - within this `impl Future`
2020-04-18 22:20:49 -05:00
|
= help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
2021-01-28 10:01:36 -06:00
= note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {ResumeTy, Arc<Mutex<()>>, &'r Mutex<()>, Result<MutexGuard<'s, ()>, PoisonError<MutexGuard<'t0, ()>>>, &'t1 MutexGuard<'t2, ()>, MutexGuard<'t3, ()>, (), impl Future}`
= note: required because it appears within the type `[static generator@run::{closure#0}]`
= note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0}]>`
= note: required because it appears within the type `impl Future`
= note: required because it appears within the type `impl Future`
2020-04-18 22:20:49 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.