2018-09-04 05:05:53 -05:00
|
|
|
//@ run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2018-06-04 18:14:33 -05:00
|
|
|
// Test case from #39963.
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
struct Foo(Option<Box<Foo>>, Option<Box<Foo>>);
|
|
|
|
|
|
|
|
fn test(f: &mut Foo) {
|
|
|
|
match *f {
|
|
|
|
Foo(Some(ref mut left), Some(ref mut right)) => match **left {
|
|
|
|
Foo(Some(ref mut left), Some(ref mut right)) => panic!(),
|
|
|
|
_ => panic!(),
|
|
|
|
},
|
|
|
|
_ => panic!(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|