]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-75785-confusing-named-region.rs
Rollup merge of #107048 - DebugSteven:newer-x-check-cargo, r=albertlarsan68
[rust.git] / tests / ui / async-await / issue-75785-confusing-named-region.rs
1 // edition:2018
2 //
3 // Regression test for issue #75785
4 // Tests that we don't point to a confusing named
5 // region when emitting a diagnostic
6
7 pub async fn async_fn(x: &mut i32) -> (&i32, &i32) {
8     let y = &*x;
9     *x += 1; //~ ERROR cannot assign to
10     (&32, y)
11 }
12
13 fn main() {}