mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-28 10:28:03 +00:00
Adds the equivalent `nonpoison` types to the `poison::mutex` module. These types and implementations are gated under the `nonpoison_mutex` feature gate. Also blesses the ui tests that now have a name conflicts (because these types no longer have unique names). The full path distinguishes the different types. Co-authored-by: Aandreba <aandreba@gmail.com> Co-authored-by: Trevor Gross <tmgross@umich.edu>
14 lines
259 B
Rust
14 lines
259 B
Rust
//@ edition:2018
|
|
#![feature(must_not_suspend)]
|
|
#![deny(must_not_suspend)]
|
|
|
|
async fn other() {}
|
|
|
|
pub async fn uhoh(m: std::sync::Mutex<()>) {
|
|
let _guard = m.lock().unwrap(); //~ ERROR `std::sync::MutexGuard` held across
|
|
other().await;
|
|
}
|
|
|
|
fn main() {
|
|
}
|