]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / lint / must_not_suspend / ref-drop-tracking.rs
1 // edition:2018
2 // compile-flags: -Zdrop-tracking
3 #![feature(must_not_suspend)]
4 #![deny(must_not_suspend)]
5
6 #[must_not_suspend = "You gotta use Umm's, ya know?"]
7 struct Umm {
8 i: i64
9 }
10
11 struct Bar {
12 u: Umm,
13 }
14
15 async fn other() {}
16
17 impl Bar {
18 async fn uhoh(&mut self) {
19 let guard = &mut self.u; //~ ERROR `Umm` held across
20
21 other().await;
22
23 *guard = Umm {
24 i: 2
25 }
26 }
27 }
28
29 fn main() {
30 }