]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-67893.stderr
Added docs to internal_macro const
[rust.git] / src / test / ui / async-await / issues / issue-67893.stderr
1 error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely
2   --> $DIR/issue-67893.rs:9:5
3    |
4 LL |     g(issue_67893::run())
5    |     ^ `MutexGuard<'_, ()>` cannot be sent between threads safely
6    |
7   ::: $DIR/auxiliary/issue_67893.rs:7:20
8    |
9 LL | pub async fn run() {
10    |                    - within this `impl Future`
11    |
12    = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
13    = 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}`
14    = note: required because it appears within the type `[static generator@run::{closure#0}]`
15    = note: required because it appears within the type `from_generator::GenFuture<[static generator@run::{closure#0}]>`
16    = note: required because it appears within the type `impl Future`
17    = note: required because it appears within the type `impl Future`
18 note: required by a bound in `g`
19   --> $DIR/issue-67893.rs:6:14
20    |
21 LL | fn g(_: impl Send) {}
22    |              ^^^^ required by this bound in `g`
23
24 error: aborting due to previous error
25
26 For more information about this error, try `rustc --explain E0277`.