2018-02-09 08:49:38 -06:00
|
|
|
error[E0503]: cannot use `e` because it was mutably borrowed
|
2018-07-22 15:13:18 -05:00
|
|
|
--> $DIR/borrowed-match-issue-45045.rs:24:11
|
2018-02-09 08:49:38 -06:00
|
|
|
|
|
2018-07-22 15:13:18 -05:00
|
|
|
LL | let f = &mut e;
|
|
|
|
| ------ borrow of `e` occurs here
|
|
|
|
LL | let g = f;
|
|
|
|
LL | match e { //~ cannot use `e` because it was mutably borrowed [E0503]
|
|
|
|
| ^ use of borrowed `e`
|
|
|
|
...
|
|
|
|
LL | *g = Xyz::B;
|
|
|
|
| ----------- borrow later used here
|
2018-02-09 08:49:38 -06:00
|
|
|
|
2018-01-15 10:14:47 -06:00
|
|
|
error[E0503]: cannot use `e` because it was mutably borrowed
|
|
|
|
--> $DIR/borrowed-match-issue-45045.rs:25:9
|
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let f = &mut e;
|
2018-01-15 10:14:47 -06:00
|
|
|
| ------ borrow of `e` occurs here
|
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | Xyz::A => println!("a"),
|
2018-01-15 10:14:47 -06:00
|
|
|
| ^^^^^^ use of borrowed `e`
|
2018-03-05 16:29:05 -06:00
|
|
|
...
|
|
|
|
LL | *g = Xyz::B;
|
|
|
|
| ----------- borrow later used here
|
2018-01-15 10:14:47 -06:00
|
|
|
|
2018-02-09 08:49:38 -06:00
|
|
|
error: aborting due to 2 previous errors
|
2018-01-15 10:14:47 -06:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0503`.
|