rust/tests/ui/issues/auxiliary/issue-2170-lib.rs
2023-01-11 09:32:08 +00:00

19 lines
190 B
Rust

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
}
}