fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0277]: `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely 2 --> $DIR/issue-67893.rs:9:5 3 | 4LL | fn g(_: impl Send) {} 5 | ---- required by this bound in `g` 6... 7LL | g(issue_67893::run()) 8 | ^ `std::sync::MutexGuard<'_, ()>` cannot be sent between threads safely 9 | 10 ::: $DIR/auxiliary/issue_67893.rs:7:20 11 | 12LL | pub async fn run() { 13 | - within this `impl std::future::Future` 14 | 15 = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::sync::MutexGuard<'_, ()>` 16 = note: required because it appears within the type `for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc<std::sync::Mutex<()>>, &'r std::sync::Mutex<()>, std::result::Result<std::sync::MutexGuard<'s, ()>, std::sync::PoisonError<std::sync::MutexGuard<'t0, ()>>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}` 17 = note: required because it appears within the type `[static generator@issue_67893::run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc<std::sync::Mutex<()>>, &'r std::sync::Mutex<()>, std::result::Result<std::sync::MutexGuard<'s, ()>, std::sync::PoisonError<std::sync::MutexGuard<'t0, ()>>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}]` 18 = note: required because it appears within the type `std::future::from_generator::GenFuture<[static generator@issue_67893::run::{{closure}}#0 for<'r, 's, 't0, 't1, 't2, 't3> {std::future::ResumeTy, std::sync::Arc<std::sync::Mutex<()>>, &'r std::sync::Mutex<()>, std::result::Result<std::sync::MutexGuard<'s, ()>, std::sync::PoisonError<std::sync::MutexGuard<'t0, ()>>>, &'t1 std::sync::MutexGuard<'t2, ()>, std::sync::MutexGuard<'t3, ()>, (), impl std::future::Future}]>` 19 = note: required because it appears within the type `impl std::future::Future` 20 = note: required because it appears within the type `impl std::future::Future` 21 22error: aborting due to previous error 23 24For more information about this error, try `rustc --explain E0277`.