Skip to content

Commit

Permalink
Resolving build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
imjacobclark committed Jun 8, 2016
1 parent 4504df7 commit 0379493
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
// except according to those terms.

enum Sexpression {
Num(()),
Cons(&'static mut Sexpression)
Num(()),
Cons(&'static mut Sexpression)
}

fn causes_ice(mut l: &mut Sexpression)
{
fn causes_ice(mut l: &mut Sexpression) {
loop { match l {
&mut Sexpression::Num(ref mut n) => {},
&mut Sexpression::Cons(ref mut expr) => {
l = &mut **expr;
&mut Sexpression::Cons(ref mut expr) => { //~ ERROR cannot borrow `l.0` as mutable more than once at a time [E0499]
//~| 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]
}
}}
}

fn main() {
}
}

0 comments on commit 0379493

Please sign in to comment.