]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/must_not_suspend/gated.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / lint / must_not_suspend / gated.rs
1 // edition:2018
2 #![deny(must_not_suspend)] //~ ERROR the `must_not_suspend`
3 //~| ERROR the `must_not_suspend`
4 //~| ERROR the `must_not_suspend`
5
6 async fn other() {}
7
8 pub async fn uhoh(m: std::sync::Mutex<()>) {
9 let _guard = m.lock().unwrap(); //~ ERROR `MutexGuard` held across
10 other().await;
11 }
12
13 fn main() {
14 }