blob: b107a99e89f1d64f0ff4947b5ff739a74bb4b3d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// https://github.com/rust-lang/rust/issues/6344
//@ 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 };
let A { x: ref x } = a;
println!("{}", x)
}
|