Resolving build failure
This commit is contained in:
parent
4504df7514
commit
0379493bd9
@ -9,16 +9,16 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
enum Sexpression {
|
enum Sexpression {
|
||||||
Num(()),
|
Num(()),
|
||||||
Cons(&'static mut Sexpression)
|
Cons(&'static mut Sexpression)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn causes_ice(mut l: &mut Sexpression)
|
fn causes_ice(mut l: &mut Sexpression) {
|
||||||
{
|
|
||||||
loop { match l {
|
loop { match l {
|
||||||
&mut Sexpression::Num(ref mut n) => {},
|
&mut Sexpression::Num(ref mut n) => {},
|
||||||
&mut Sexpression::Cons(ref mut expr) => {
|
&mut Sexpression::Cons(ref mut expr) => { //~ ERROR cannot borrow `l.0` as mutable more than once at a time [E0499]
|
||||||
l = &mut **expr;
|
//~| ERROR cannot borrow `l.0` as mutable more than once at a time [E0499]
|
||||||
|
l = &mut **expr; //~ ERROR cannot assign to `l` because it is borrowed [E0506]
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user