summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-3220.rs
blob: 7dc672edb54bb682d83c7ddbec584fad65a1c4b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
// pretty-expanded FIXME #23616

struct thing { x: isize, }

impl Drop for thing {
    fn drop(&mut self) {}
}

fn thing() -> thing {
    thing {
        x: 0
    }
}

impl thing {
    pub fn f(self) {}
}

pub fn main() {
    let z = thing();
    (z).f();
}