]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/match-guards-partially-borrow.stderr
Merge remote-tracking branch 'upstream/master' into asm-compile-tests
[rust.git] / src / test / ui / nll / match-guards-partially-borrow.stderr
1 error[E0510]: cannot assign `q` in match guard
2   --> $DIR/match-guards-partially-borrow.rs:59:13
3    |
4 LL |     match q {
5    |           - value is immutable in match guard
6 ...
7 LL |             q = true;
8    |             ^^^^^^^^ cannot assign
9
10 error[E0510]: cannot assign `r` in match guard
11   --> $DIR/match-guards-partially-borrow.rs:71:13
12    |
13 LL |     match r {
14    |           - value is immutable in match guard
15 ...
16 LL |             r = true;
17    |             ^^^^^^^^ cannot assign
18
19 error[E0510]: cannot assign `t` in match guard
20   --> $DIR/match-guards-partially-borrow.rs:95:13
21    |
22 LL |     match t {
23    |           - value is immutable in match guard
24 ...
25 LL |             t = true;
26    |             ^^^^^^^^ cannot assign
27
28 error[E0510]: cannot mutably borrow `x.0` in match guard
29   --> $DIR/match-guards-partially-borrow.rs:109:22
30    |
31 LL |     match x {
32    |           - value is immutable in match guard
33 ...
34 LL |                 Some(ref mut r) => *r = None,
35    |                      ^^^^^^^^^ cannot mutably borrow
36
37 error[E0506]: cannot assign to `t` because it is borrowed
38   --> $DIR/match-guards-partially-borrow.rs:121:13
39    |
40 LL |         s if {
41    |         - borrow of `t` occurs here
42 LL |             t = !t;
43    |             ^^^^^^ assignment to borrowed `t` occurs here
44 LL |             false
45 LL |         } => (), // What value should `s` have in the arm?
46    |         - borrow later used here
47
48 error[E0510]: cannot assign `y` in match guard
49   --> $DIR/match-guards-partially-borrow.rs:132:13
50    |
51 LL |     match *y {
52    |           -- value is immutable in match guard
53 ...
54 LL |             y = &true;
55    |             ^^^^^^^^^ cannot assign
56
57 error[E0510]: cannot assign `z` in match guard
58   --> $DIR/match-guards-partially-borrow.rs:143:13
59    |
60 LL |     match z {
61    |           - value is immutable in match guard
62 ...
63 LL |             z = &true;
64    |             ^^^^^^^^^ cannot assign
65
66 error[E0510]: cannot assign `a` in match guard
67   --> $DIR/match-guards-partially-borrow.rs:155:13
68    |
69 LL |     match a {
70    |           - value is immutable in match guard
71 ...
72 LL |             a = &true;
73    |             ^^^^^^^^^ cannot assign
74
75 error[E0510]: cannot assign `b` in match guard
76   --> $DIR/match-guards-partially-borrow.rs:166:13
77    |
78 LL |     match b {
79    |           - value is immutable in match guard
80 ...
81 LL |             b = &true;
82    |             ^^^^^^^^^ cannot assign
83
84 error: aborting due to 9 previous errors
85
86 Some errors occurred: E0506, E0510.
87 For more information about an error, try `rustc --explain E0506`.