error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:24:5 | 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] 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` error[E0503]: cannot use `e` because it was mutably borrowed --> $DIR/borrowed-match-issue-45045.rs:25:9 | LL | let f = &mut e; | ------ borrow of `e` occurs here ... LL | Xyz::A => println!("a"), | ^^^^^^ use of borrowed `e` error: aborting due to 2 previous errors If you want more information on this error, try using "rustc --explain E0503"