summaryrefslogtreecommitdiffstats
path: root/tests/ui/drop/drop-trait.rs
blob: d93f77180911c71701c783788f8122f425f6b111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// run-pass
#![allow(dead_code)]
struct Foo {
    x: isize
}

impl Drop for Foo {
    fn drop(&mut self) {
        println!("bye");
    }
}

pub fn main() {
    let _x: Foo = Foo { x: 3 };
}