]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/must_not_suspend/generic.rs
94457e375400e69572c041dfca450be13f8d17af
[rust.git] / src / test / ui / lint / must_not_suspend / generic.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     //~^ ERROR `No` held across
18 }
19
20 fn main() {
21 }