2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_shorthand_field_patterns)]
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
struct A { x: usize }
|
2013-05-10 19:42:24 +10:00
|
|
|
|
|
|
|
impl Drop for A {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {}
|
2013-05-10 19:42:24 +10:00
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2013-05-10 19:42:24 +10:00
|
|
|
let a = A { x: 0 };
|
|
|
|
|
|
|
|
match a {
|
|
|
|
A { x : ref x } => {
|
2014-10-14 21:07:11 -04:00
|
|
|
println!("{}", x)
|
2013-05-10 19:42:24 +10:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|