summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-75785-confusing-named-region.rs
blob: 452614087be947c15a60911692280c2c058b2c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// edition:2018
//
// Regression test for issue #75785
// Tests that we don't point to a confusing named
// region when emitting a diagnostic

pub async fn async_fn(x: &mut i32) -> (&i32, &i32) {
    let y = &*x;
    *x += 1; //~ ERROR cannot assign to
    (&32, y)
}

fn main() {}