rust/tests/ui/lint/must_not_suspend/gated.rs
2024-02-16 20:02:50 +00:00

16 lines
245 B
Rust

//@ check-pass
//@ edition:2018
#![deny(must_not_suspend)]
//~^ WARNING unknown lint: `must_not_suspend`
async fn other() {}
pub async fn uhoh(m: std::sync::Mutex<()>) {
let _guard = m.lock().unwrap();
other().await;
}
fn main() {
}