rust/src/test/ui/issues/issue-6344-let.rs
2019-07-27 18:56:16 +03:00

16 lines
216 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 };
let A { x: ref x } = a;
println!("{}", x)
}