rust/tests/ui/async-await/multiple-lifetimes/ret-ref.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0506]: cannot assign to `a` because it is borrowed
--> $DIR/ret-ref.rs:16:5
|
LL | let future = multiple_named_lifetimes(&a, &b);
2023-01-14 21:06:44 -06:00
| -- `a` is borrowed here
LL | a += 1;
2023-01-14 21:06:44 -06:00
| ^^^^^^ `a` is assigned to here but it was already borrowed
LL | b += 1;
LL | let p = future.await;
| ------ borrow later used here
error[E0506]: cannot assign to `b` because it is borrowed
--> $DIR/ret-ref.rs:17:5
|
LL | let future = multiple_named_lifetimes(&a, &b);
2023-01-14 21:06:44 -06:00
| -- `b` is borrowed here
LL | a += 1;
LL | b += 1;
2023-01-14 21:06:44 -06:00
| ^^^^^^ `b` is assigned to here but it was already borrowed
LL | let p = future.await;
| ------ borrow later used here
error[E0506]: cannot assign to `a` because it is borrowed
--> $DIR/ret-ref.rs:28:5
|
LL | let future = multiple_named_lifetimes(&a, &b);
2023-01-14 21:06:44 -06:00
| -- `a` is borrowed here
LL | let p = future.await;
LL | a += 1;
2023-01-14 21:06:44 -06:00
| ^^^^^^ `a` is assigned to here but it was already borrowed
LL | b += 1;
LL | drop(p);
| - borrow later used here
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0506`.