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