summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/must_not_suspend/gated.rs
blob: b73a76555296fc5b5c7e1c2dae7cbc65d6b42d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// check-pass

// edition:2018
#![deny(must_not_suspend)]
//~^ WARNING unknown lint: `must_not_suspend`
//~| WARNING unknown lint: `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() {
}