fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.9 KiB170 linesraw
1error[E0510]: cannot assign `q` in match guard
2  --> $DIR/match-guards-partially-borrow.rs:100:13
3   |
4LL |     match q {
5   |           - value is immutable in match guard
6...
7LL |             q = true;
8   |             ^^^^^^^^ cannot assign
9
10error[E0510]: cannot assign `q` in match guard
11  --> $DIR/match-guards-partially-borrow.rs:111:13
12   |
13LL |     match q {
14   |           - value is immutable in match guard
15...
16LL |             q = true;
17   |             ^^^^^^^^ cannot assign
18
19error[E0510]: cannot assign `r` in match guard
20  --> $DIR/match-guards-partially-borrow.rs:123:13
21   |
22LL |     match r {
23   |           - value is immutable in match guard
24...
25LL |             r = true;
26   |             ^^^^^^^^ cannot assign
27
28error[E0510]: cannot assign `r` in match guard
29  --> $DIR/match-guards-partially-borrow.rs:135:13
30   |
31LL |     match r {
32   |           - value is immutable in match guard
33...
34LL |             r = true;
35   |             ^^^^^^^^ cannot assign
36
37error[E0510]: cannot assign `t` in match guard
38  --> $DIR/match-guards-partially-borrow.rs:172:13
39   |
40LL |     match t {
41   |           - value is immutable in match guard
42...
43LL |             t = true;
44   |             ^^^^^^^^ cannot assign
45
46error[E0510]: cannot assign `t` in match guard
47  --> $DIR/match-guards-partially-borrow.rs:183:13
48   |
49LL |     match t {
50   |           - value is immutable in match guard
51...
52LL |             t = true;
53   |             ^^^^^^^^ cannot assign
54
55error[E0510]: cannot mutably borrow `x.0` in match guard
56  --> $DIR/match-guards-partially-borrow.rs:197:22
57   |
58LL |     match x {
59   |           - value is immutable in match guard
60...
61LL |                 Some(ref mut r) => *r = None,
62   |                      ^^^^^^^^^ cannot mutably borrow
63
64error[E0510]: cannot mutably borrow `x.0` in match guard
65  --> $DIR/match-guards-partially-borrow.rs:213:22
66   |
67LL |     match x {
68   |           - value is immutable in match guard
69...
70LL |                 Some(ref mut r) => *r = None,
71   |                      ^^^^^^^^^ cannot mutably borrow
72
73error[E0506]: cannot assign to `t` because it is borrowed
74  --> $DIR/match-guards-partially-borrow.rs:225:13
75   |
76LL |         s if {
77   |         - `t` is borrowed here
78LL |             t = !t;
79   |             ^^^^^^ `t` is assigned to here but it was already borrowed
80LL |             false
81LL |         } => (), // What value should `s` have in the arm?
82   |         - borrow later used here
83
84error[E0506]: cannot assign to `t` because it is borrowed
85  --> $DIR/match-guards-partially-borrow.rs:235:13
86   |
87LL |         s if let Some(()) = {
88   |         - `t` is borrowed here
89LL |             t = !t;
90   |             ^^^^^^ `t` is assigned to here but it was already borrowed
91LL |             None
92LL |         } => (), // What value should `s` have in the arm?
93   |         - borrow later used here
94
95error[E0510]: cannot assign `y` in match guard
96  --> $DIR/match-guards-partially-borrow.rs:246:13
97   |
98LL |     match *y {
99   |           -- value is immutable in match guard
100...
101LL |             y = &true;
102   |             ^^^^^^^^^ cannot assign
103
104error[E0510]: cannot assign `y` in match guard
105  --> $DIR/match-guards-partially-borrow.rs:257:13
106   |
107LL |     match *y {
108   |           -- value is immutable in match guard
109...
110LL |             y = &true;
111   |             ^^^^^^^^^ cannot assign
112
113error[E0510]: cannot assign `z` in match guard
114  --> $DIR/match-guards-partially-borrow.rs:268:13
115   |
116LL |     match z {
117   |           - value is immutable in match guard
118...
119LL |             z = &true;
120   |             ^^^^^^^^^ cannot assign
121
122error[E0510]: cannot assign `z` in match guard
123  --> $DIR/match-guards-partially-borrow.rs:279:13
124   |
125LL |     match z {
126   |           - value is immutable in match guard
127...
128LL |             z = &true;
129   |             ^^^^^^^^^ cannot assign
130
131error[E0510]: cannot assign `a` in match guard
132  --> $DIR/match-guards-partially-borrow.rs:291:13
133   |
134LL |     match a {
135   |           - value is immutable in match guard
136...
137LL |             a = &true;
138   |             ^^^^^^^^^ cannot assign
139
140error[E0510]: cannot assign `a` in match guard
141  --> $DIR/match-guards-partially-borrow.rs:303:13
142   |
143LL |     match a {
144   |           - value is immutable in match guard
145...
146LL |             a = &true;
147   |             ^^^^^^^^^ cannot assign
148
149error[E0510]: cannot assign `b` in match guard
150  --> $DIR/match-guards-partially-borrow.rs:314:13
151   |
152LL |     match b {
153   |           - value is immutable in match guard
154...
155LL |             b = &true;
156   |             ^^^^^^^^^ cannot assign
157
158error[E0510]: cannot assign `b` in match guard
159  --> $DIR/match-guards-partially-borrow.rs:325:13
160   |
161LL |     match b {
162   |           - value is immutable in match guard
163...
164LL |             b = &true;
165   |             ^^^^^^^^^ cannot assign
166
167error: aborting due to 18 previous errors
168
169Some errors have detailed explanations: E0506, E0510.
170For more information about an error, try `rustc --explain E0506`.