summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-73741-type-err-drop-tracking.rs
blob: 1fa8d69143a22ce9ac462e5d27f54fcb9cc47475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// edition:2018
// revisions: no_drop_tracking drop_tracking drop_tracking_mir
// [drop_tracking] compile-flags: -Zdrop-tracking
// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
//
// 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() {}