blob: 6f74a75375e32f855c931ce37cf4cf57219e4cb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
error[E0503]: cannot use `*x` because it was mutably borrowed
--> $DIR/privately-uninhabited-issue-137999.rs:25:30
|
LL | Test::A(a, _) => a,
| - `x.0` is borrowed here
...
LL | let r2: &mut u32 = match x {
| ^ use of borrowed `x.0`
...
LL | let _ = *r1;
| --- borrow later used here
error[E0503]: cannot use `*x` because it was mutably borrowed
--> $DIR/privately-uninhabited-issue-137999.rs:36:11
|
LL | let r = &mut *x;
| ------- `*x` is borrowed here
LL | match x {
| ^ use of borrowed `*x`
...
LL | let _ = r;
| - borrow later used here
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0503`.
|