summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-6344-let.rs
blob: a7b6a2e2d66782033f8f83efbaca5e2a76b68309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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)
}