summaryrefslogtreecommitdiff
path: root/src/test/ui/nll/match-on-borrowed.stderr
blob: 2d34dd7805dbf5337f08b3d3a5d00937d117363a (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
error[E0503]: cannot use `e` because it was mutably borrowed
  --> $DIR/match-on-borrowed.rs:51:9
   |
LL |         E::V(ref mut x, _) => x,
   |              --------- borrow of `e.0` occurs here
...
LL |         E::V(_, r) => (), //~ ERROR
   |         ^^^^^^^^^^ use of borrowed `e.0`
...
LL |     x;
   |     - borrow later used here

error[E0503]: cannot use `*f` because it was mutably borrowed
  --> $DIR/match-on-borrowed.rs:64:9
   |
LL |         E::V(ref mut x, _) => x,
   |              --------- borrow of `f.0` occurs here
...
LL |         E::V(_, r) => (), //~ ERROR
   |         ^^^^^^^^^^ use of borrowed `f.0`
...
LL |     x;
   |     - borrow later used here

error[E0503]: cannot use `t` because it was mutably borrowed
  --> $DIR/match-on-borrowed.rs:82:9
   |
LL |     let x = &mut t;
   |             ------ borrow of `t` occurs here
LL |     match t {
LL |         true => (), //~ ERROR
   |         ^^^^ use of borrowed `t`
...
LL |     x;
   |     - borrow later used here

error[E0381]: use of possibly uninitialized variable: `n`
  --> $DIR/match-on-borrowed.rs:92:11
   |
LL |     match n {} //~ ERROR
   |           ^ use of possibly uninitialized `n`

error: aborting due to 4 previous errors

Some errors occurred: E0381, E0503.
For more information about an error, try `rustc --explain E0381`.