]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-73741-type-err-drop-tracking.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / async-await / issue-73741-type-err-drop-tracking.rs
1 // edition:2018
2 // revisions: no_drop_tracking drop_tracking drop_tracking_mir
3 // [drop_tracking] compile-flags: -Zdrop-tracking
4 // [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
5 //
6 // Regression test for issue #73741
7 // Ensures that we don't emit spurious errors when
8 // a type error ocurrs in an `async fn`
9
10 async fn weird() {
11     1 = 2; //~ ERROR invalid left-hand side
12
13     let mut loop_count = 0;
14     async {}.await
15 }
16
17 fn main() {}