rust/src/test/ui/nll/borrowed-match-issue-45045.stderr

26 lines
886 B
Plaintext
Raw Normal View History

error[E0503]: cannot use `e` because it was mutably borrowed
--> $DIR/borrowed-match-issue-45045.rs:24:5
|
2018-02-22 18:42:32 -06:00
LL | let f = &mut e;
| ------ borrow of `e` occurs here
23 | let g = f;
2018-02-22 18:42:32 -06:00
LL | / match e { //~ cannot use `e` because it was mutably borrowed [E0503]
LL | | Xyz::A => println!("a"),
LL | | //~^ cannot use `e` because it was mutably borrowed [E0503]
LL | | Xyz::B => println!("b"),
LL | | };
| |_____^ use of borrowed `e`
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`
error: aborting due to 2 previous errors
2018-01-15 10:14:47 -06:00
2018-02-19 14:40:25 -06:00
If you want more information on this error, try using "rustc --explain E0503"