]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/must_not_suspend/dedup.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / lint / must_not_suspend / dedup.rs
1 // edition:2018
2 #![feature(must_not_suspend)]
3 #![deny(must_not_suspend)]
4
5 #[must_not_suspend]
6 struct No {}
7
8 async fn shushspend() {}
9
10 async fn wheeee<T>(t: T) {
11     shushspend().await;
12     drop(t);
13 }
14
15 async fn yes() {
16     wheeee(&No {}).await; //~ ERROR `No` held across
17 }
18
19 fn main() {
20 }