diff options
Diffstat (limited to 'tests/ui/async-await/issue-73741-type-err-drop-tracking.rs')
-rw-r--r-- | tests/ui/async-await/issue-73741-type-err-drop-tracking.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs b/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs new file mode 100644 index 000000000..c3423ad62 --- /dev/null +++ b/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs @@ -0,0 +1,14 @@ +// edition:2018 +// compile-flags: -Zdrop-tracking +// Regression test for issue #73741 +// Ensures that we don't emit spurious errors when +// a type error ocurrs in an `async fn` + +async fn weird() { + 1 = 2; //~ ERROR invalid left-hand side + + let mut loop_count = 0; + async {}.await +} + +fn main() {} |