We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0379493 commit 4c5f3a6Copy full SHA for 4c5f3a6
src/test/compile-fail/issue-25579.rs
@@ -16,12 +16,12 @@ enum Sexpression {
16
fn causes_ice(mut l: &mut Sexpression) {
17
loop { match l {
18
&mut Sexpression::Num(ref mut n) => {},
19
- &mut Sexpression::Cons(ref mut expr) => { //~ ERROR cannot borrow `l.0` as mutable more than once at a time [E0499]
20
- //~| ERROR cannot borrow `l.0` as mutable more than once at a time [E0499]
21
- l = &mut **expr; //~ ERROR cannot assign to `l` because it is borrowed [E0506]
+ &mut Sexpression::Cons(ref mut expr) => { //~ ERROR cannot borrow `l.0`
+ //~| ERROR cannot borrow `l.0`
+ l = &mut **expr; //~ ERROR cannot assign to `l`
22
}
23
}}
24
25
26
fn main() {
27
-}
+}
0 commit comments