mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
19 lines
256 B
Rust
19 lines
256 B
Rust
//@ run-pass
|
|
#![allow(non_shorthand_field_patterns)]
|
|
|
|
struct A { x: usize }
|
|
|
|
impl Drop for A {
|
|
fn drop(&mut self) {}
|
|
}
|
|
|
|
pub fn main() {
|
|
let a = A { x: 0 };
|
|
|
|
match a {
|
|
A { x : ref x } => {
|
|
println!("{}", x)
|
|
}
|
|
}
|
|
}
|