summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/drop-track-bad-field-in-fru.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/drop-track-bad-field-in-fru.rs')
-rw-r--r--tests/ui/async-await/drop-track-bad-field-in-fru.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/async-await/drop-track-bad-field-in-fru.rs b/tests/ui/async-await/drop-track-bad-field-in-fru.rs
new file mode 100644
index 000000000..28ad77675
--- /dev/null
+++ b/tests/ui/async-await/drop-track-bad-field-in-fru.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Zdrop-tracking
+// edition: 2021
+
+fn main() {}
+
+async fn foo() {
+ None { value: (), ..Default::default() }.await;
+ //~^ ERROR `Option<_>` is not a future
+ //~| ERROR variant `Option<_>::None` has no field named `value`
+}