]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/borrowed-match-issue-45045.stderr
Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelix
[rust.git] / src / test / ui / nll / borrowed-match-issue-45045.stderr
1 error[E0503]: cannot use `e` because it was mutably borrowed
2   --> $DIR/borrowed-match-issue-45045.rs:24:11
3    |
4 LL |     let f = &mut e;
5    |             ------ borrow of `e` occurs here
6 LL |     let g = f;
7 LL |     match e { //~ cannot use `e` because it was mutably borrowed [E0503]
8    |           ^ use of borrowed `e`
9 ...
10 LL |     *g = Xyz::B;
11    |     ----------- borrow later used here
12
13 error[E0503]: cannot use `e` because it was mutably borrowed
14   --> $DIR/borrowed-match-issue-45045.rs:25:9
15    |
16 LL |     let f = &mut e;
17    |             ------ borrow of `e` occurs here
18 ...
19 LL |         Xyz::A => println!("a"),
20    |         ^^^^^^ use of borrowed `e`
21 ...
22 LL |     *g = Xyz::B;
23    |     ----------- borrow later used here
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0503`.