11error: 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
33 |
44LL | ref foo @ [.., ref mut bar] => (),
55 | -------^^^^^^^^-----------^
@@ -8,7 +8,7 @@ LL | ref foo @ [.., ref mut bar] => (),
88 | immutable borrow, by `foo`, occurs here
99
1010error: 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
1212 |
1313LL | ref foo @ Some(box ref mut s) => (),
1414 | -------^^^^^^^^^^^^---------^
@@ -17,7 +17,7 @@ LL | ref foo @ Some(box ref mut s) => (),
1717 | immutable borrow, by `foo`, occurs here
1818
1919error[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
2121 |
2222LL | fn bindings_after_at_slice_patterns_move_binding(x: [String; 4]) {
2323 | - move occurs because `x` has type `[String; 4]`, which does not implement the `Copy` trait
@@ -29,7 +29,7 @@ LL | &x;
2929 | ^^ value borrowed here after move
3030
3131error[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
3333 |
3434LL | ref mut foo @ [.., _] => Some(foo),
3535 | --------------------- mutable borrow occurs here
@@ -41,7 +41,7 @@ LL | drop(r);
4141 | - mutable borrow later used here
4242
4343error[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
4545 |
4646LL | [ref foo @ .., ref bar] => Some(foo),
4747 | ------------ immutable borrow occurs here
@@ -53,7 +53,7 @@ LL | drop(r);
5353 | - immutable borrow later used here
5454
5555error[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
5757 |
5858LL | ref foo @ [.., ref bar] => Some(foo),
5959 | ----------------------- immutable borrow occurs here
@@ -65,7 +65,7 @@ LL | drop(r);
6565 | - immutable borrow later used here
6666
6767error[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
6969 |
7070LL | fn bindings_after_at_or_patterns_move(x: Option<Test>) {
7171 | - move occurs because `x` has type `Option<Test>`, which does not implement the `Copy` trait
@@ -80,7 +80,7 @@ LL | &x;
8080 | ^^ value borrowed here after move
8181
8282error[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
8484 |
8585LL | ref foo @ Some(Test::Foo | Test::Bar) => Some(foo),
8686 | ------------------------------------- immutable borrow occurs here
@@ -92,7 +92,7 @@ LL | drop(r);
9292 | - immutable borrow later used here
9393
9494error[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
9696 |
9797LL | ref mut foo @ Some(Test::Foo | Test::Bar) => Some(foo),
9898 | ----------------------------------------- mutable borrow occurs here
@@ -104,7 +104,7 @@ LL | drop(r);
104104 | - mutable borrow later used here
105105
106106error[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
108108 |
109109LL | ref foo @ Some(box ref s) => Some(foo),
110110 | ------------------------- immutable borrow occurs here
@@ -116,7 +116,7 @@ LL | drop(r);
116116 | - immutable borrow later used here
117117
118118error[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
120120 |
121121LL | fn bindings_after_at_slice_patterns_or_patterns_moves(x: [Option<Test>; 4]) {
122122 | - move occurs because `x` has type `[Option<Test>; 4]`, which does not implement the `Copy` trait
@@ -131,7 +131,7 @@ LL | &x;
131131 | ^^ value borrowed here after move
132132
133133error[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
135135 |
136136LL | ref a @ [ref b @ .., Some(Test::Foo | Test::Bar)] => Some(a),
137137 | ------------------------------------------------- immutable borrow occurs here
@@ -143,7 +143,7 @@ LL | drop(r);
143143 | - immutable borrow later used here
144144
145145error[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
147147 |
148148LL | ref a @ [ref b @ .., Some(Test::Foo | Test::Bar)] => Some(b),
149149 | ---------- immutable borrow occurs here
@@ -155,7 +155,7 @@ LL | drop(r);
155155 | - immutable borrow later used here
156156
157157error[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
159159 |
160160LL | [_, ref a @ Some(box ref b), ..] => Some(a),
161161 | ----------------------- immutable borrow occurs here
@@ -167,7 +167,7 @@ LL | drop(r);
167167 | - immutable borrow later used here
168168
169169error[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
171171 |
172172LL | [_, ref a @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
173173 | ------------------------------------------- immutable borrow occurs here
@@ -179,7 +179,7 @@ LL | drop(r);
179179 | - immutable borrow later used here
180180
181181error[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
183183 |
184184LL | [_, ref mut a @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
185185 | ----------------------------------------------- mutable borrow occurs here
@@ -191,7 +191,7 @@ LL | drop(r);
191191 | - mutable borrow later used here
192192
193193error[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
195195 |
196196LL | ref a @ [_, ref b @ Some(box Test::Foo | box Test::Bar), ..] => Some(a),
197197 | ------------------------------------------------------------ immutable borrow occurs here
0 commit comments