Skip to content

Commit 0379493

Browse files
committed
Resolving build failure
1 parent 4504df7 commit 0379493

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/run-pass/issue-25579.rs renamed to src/test/compile-fail/issue-25579.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
// except according to those terms.
1010

1111
enum Sexpression {
12-
Num(()),
13-
Cons(&'static mut Sexpression)
12+
Num(()),
13+
Cons(&'static mut Sexpression)
1414
}
1515

16-
fn causes_ice(mut l: &mut Sexpression)
17-
{
16+
fn causes_ice(mut l: &mut Sexpression) {
1817
loop { match l {
1918
&mut Sexpression::Num(ref mut n) => {},
20-
&mut Sexpression::Cons(ref mut expr) => {
21-
l = &mut **expr;
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]
2222
}
2323
}}
2424
}
2525

2626
fn main() {
27-
}
27+
}

0 commit comments

Comments
 (0)