1
1
error: cannot borrow value as mutable because it is also borrowed as immutable
2
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:37 :9
2
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:36 :9
3
3
|
4
4
LL | ref foo @ [.., ref mut bar] => (),
5
5
| -------^^^^^^^^-----------^
@@ -8,7 +8,7 @@ LL | ref foo @ [.., ref mut bar] => (),
8
8
| immutable borrow, by `foo`, occurs here
9
9
10
10
error: cannot borrow value as mutable because it is also borrowed as immutable
11
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:121 :9
11
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:120 :9
12
12
|
13
13
LL | ref foo @ Some(box ref mut s) => (),
14
14
| -------^^^^^^^^^^^^---------^
@@ -17,7 +17,7 @@ LL | ref foo @ Some(box ref mut s) => (),
17
17
| immutable borrow, by `foo`, occurs here
18
18
19
19
error[E0382]: borrow of moved value: `x`
20
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:19 :5
20
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:18 :5
21
21
|
22
22
LL | fn bindings_after_at_slice_patterns_move_binding(x: [String; 4]) {
23
23
| - move occurs because `x` has type `[String; 4]`, which does not implement the `Copy` trait
@@ -29,7 +29,7 @@ LL | &x;
29
29
| ^^ value borrowed here after move
30
30
31
31
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
32
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:29 :5
32
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:28 :5
33
33
|
34
34
LL | ref mut foo @ [.., _] => Some(foo),
35
35
| --------------------- mutable borrow occurs here
@@ -41,7 +41,7 @@ LL | drop(r);
41
41
| - mutable borrow later used here
42
42
43
43
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
44
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:51 :5
44
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:50 :5
45
45
|
46
46
LL | [ref foo @ .., ref bar] => Some(foo),
47
47
| ------------ immutable borrow occurs here
@@ -53,7 +53,7 @@ LL | drop(r);
53
53
| - immutable borrow later used here
54
54
55
55
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
56
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:63 :5
56
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:62 :5
57
57
|
58
58
LL | ref foo @ [.., ref bar] => Some(foo),
59
59
| ----------------------- immutable borrow occurs here
@@ -65,7 +65,7 @@ LL | drop(r);
65
65
| - immutable borrow later used here
66
66
67
67
error[E0382]: borrow of moved value: `x`
68
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:77 :5
68
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:76 :5
69
69
|
70
70
LL | fn bindings_after_at_or_patterns_move(x: Option<Test>) {
71
71
| - move occurs because `x` has type `Option<Test>`, which does not implement the `Copy` trait
@@ -80,7 +80,7 @@ LL | &x;
80
80
| ^^ value borrowed here after move
81
81
82
82
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
83
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:87 :5
83
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:86 :5
84
84
|
85
85
LL | ref foo @ Some(Test::Foo | Test::Bar) => Some(foo),
86
86
| ------------------------------------- immutable borrow occurs here
@@ -92,7 +92,7 @@ LL | drop(r);
92
92
| - immutable borrow later used here
93
93
94
94
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
95
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:99 :5
95
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:98 :5
96
96
|
97
97
LL | ref mut foo @ Some(Test::Foo | Test::Bar) => Some(foo),
98
98
| ----------------------------------------- mutable borrow occurs here
@@ -104,7 +104,7 @@ LL | drop(r);
104
104
| - mutable borrow later used here
105
105
106
106
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
107
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:113 :5
107
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:112 :5
108
108
|
109
109
LL | ref foo @ Some(box ref s) => Some(foo),
110
110
| ------------------------- immutable borrow occurs here
@@ -116,7 +116,7 @@ LL | drop(r);
116
116
| - immutable borrow later used here
117
117
118
118
error[E0382]: borrow of moved value: `x`
119
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:135 :5
119
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:134 :5
120
120
|
121
121
LL | fn bindings_after_at_slice_patterns_or_patterns_moves(x: [Option<Test>; 4]) {
122
122
| - move occurs because `x` has type `[Option<Test>; 4]`, which does not implement the `Copy` trait
@@ -131,7 +131,7 @@ LL | &x;
131
131
| ^^ value borrowed here after move
132
132
133
133
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
134
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:145 :5
134
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:144 :5
135
135
|
136
136
LL | ref a @ [ref b @ .., Some(Test::Foo | Test::Bar)] => Some(a),
137
137
| ------------------------------------------------- immutable borrow occurs here
@@ -143,7 +143,7 @@ LL | drop(r);
143
143
| - immutable borrow later used here
144
144
145
145
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
146
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:157 :5
146
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:156 :5
147
147
|
148
148
LL | ref a @ [ref b @ .., Some(Test::Foo | Test::Bar)] => Some(b),
149
149
| ---------- immutable borrow occurs here
@@ -155,7 +155,7 @@ LL | drop(r);
155
155
| - immutable borrow later used here
156
156
157
157
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
158
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:171 :5
158
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:170 :5
159
159
|
160
160
LL | [_, ref a @ Some(box ref b), ..] => Some(a),
161
161
| ----------------------- immutable borrow occurs here
@@ -167,7 +167,7 @@ LL | drop(r);
167
167
| - immutable borrow later used here
168
168
169
169
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
170
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:187 :5
170
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:186 :5
171
171
|
172
172
LL | [_, ref a @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
173
173
| ------------------------------------------- immutable borrow occurs here
@@ -179,7 +179,7 @@ LL | drop(r);
179
179
| - immutable borrow later used here
180
180
181
181
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
182
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:201 :5
182
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:200 :5
183
183
|
184
184
LL | [_, ref mut a @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
185
185
| ----------------------------------------------- mutable borrow occurs here
@@ -191,7 +191,7 @@ LL | drop(r);
191
191
| - mutable borrow later used here
192
192
193
193
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
194
- --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:215 :5
194
+ --> $DIR/bindings-after-at-or-patterns-slice-patterns-box-patterns.rs:214 :5
195
195
|
196
196
LL | ref a @ [_, ref b @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
197
197
| ------------------------------------------------------------ immutable borrow occurs here
0 commit comments