We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3924dac commit bdfc688Copy full SHA for bdfc688
src/test/ui/lint/must_not_suspend/ref-drop-tracking.rs
@@ -0,0 +1,30 @@
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
0 commit comments