Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 407 Bytes
// build-pass (FIXME(62277): could be check-pass?)
enum Sexpression {
Num(()),
Cons(&'static mut Sexpression)
}
fn causes_error_in_ast(mut l: &mut Sexpression) {
loop { match l {
&mut Sexpression::Num(ref mut n) => {},
&mut Sexpression::Cons(ref mut expr) => {
l = &mut **expr;
}
}}
}
fn main() {
causes_error_in_ast(&mut Sexpression::Num(()));
}
You can’t perform that action at this time.