Files
rust/tests/ui/issues/issue-3220.rs

25 lines
292 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
struct thing { x: isize, }
impl Drop for thing {
2013-09-16 21:18:07 -04:00
fn drop(&mut self) {}
}
2012-09-05 15:58:43 -07:00
fn thing() -> thing {
thing {
x: 0
}
}
impl thing {
pub fn f(self) {}
}
pub fn main() {
let z = thing();
2013-02-15 02:44:18 -08:00
(z).f();
}