mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
21 lines
390 B
Rust
21 lines
390 B
Rust
//@ run-pass
|
|
#![allow(dead_code)]
|
|
#![allow(unused_variables)]
|
|
// 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() {
|
|
}
|