summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/auxiliary/issue-2170-lib.rs
blob: a99385a834dfb5fb2e3b9371324ce414336ff8bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn foo(_x: i32) {
}

pub struct rsrc {
  x: i32,
}

impl Drop for rsrc {
    fn drop(&mut self) {
        foo(self.x);
    }
}

pub fn rsrc(x: i32) -> rsrc {
    rsrc {
        x: x
    }
}