1 error[E0506]: cannot assign to `*x` because it is borrowed
2 --> $DIR/issue-74072-lifetime-name-annotations.rs:9:5
4 LL | pub async fn async_fn(x: &mut i32) -> &i32 {
5 | - let's call the lifetime of this reference `'1`
7 | --- borrow of `*x` occurs here
9 | ^^^^^^^ assignment to borrowed `*x` occurs here
11 | - returning this value requires that `*x` is borrowed for `'1`
13 error[E0506]: cannot assign to `*x` because it is borrowed
14 --> $DIR/issue-74072-lifetime-name-annotations.rs:16:9
17 | --- borrow of `*x` occurs here
19 | ^^^^^^^ assignment to borrowed `*x` occurs here
21 | - returning this value requires that `*x` is borrowed for `'1`
23 | - return type of async closure is &'1 i32
25 error[E0506]: cannot assign to `*x` because it is borrowed
26 --> $DIR/issue-74072-lifetime-name-annotations.rs:24:9
28 LL | (async move || -> &i32 {
29 | - let's call the lifetime of this reference `'1`
31 | --- borrow of `*x` occurs here
33 | ^^^^^^^ assignment to borrowed `*x` occurs here
35 | - returning this value requires that `*x` is borrowed for `'1`
37 error[E0506]: cannot assign to `*x` because it is borrowed
38 --> $DIR/issue-74072-lifetime-name-annotations.rs:32:9
41 | --- borrow of `*x` occurs here
43 | ^^^^^^^ assignment to borrowed `*x` occurs here
45 | - returning this value requires that `*x` is borrowed for `'1`
47 | - return type of async block is &'1 i32
49 error: aborting due to 4 previous errors
51 For more information about this error, try `rustc --explain E0506`.