diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/lint/must_not_suspend/unit.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ui/lint/must_not_suspend/unit.rs b/tests/ui/lint/must_not_suspend/unit.rs index d3a19f704..fbc51b366 100644 --- a/tests/ui/lint/must_not_suspend/unit.rs +++ b/tests/ui/lint/must_not_suspend/unit.rs @@ -1,3 +1,6 @@ +// revisions: no_drop_tracking drop_tracking drop_tracking_mir +// [drop_tracking] compile-flags: -Zdrop-tracking +// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir // edition:2018 #![feature(must_not_suspend)] #![deny(must_not_suspend)] @@ -7,7 +10,6 @@ struct Umm { i: i64 } - fn bar() -> Umm { Umm { i: 1 @@ -19,6 +21,7 @@ async fn other() {} pub async fn uhoh() { let _guard = bar(); //~ ERROR `Umm` held across other().await; + drop(_guard); } fn main() { |