about summary refs log tree commit diff
path: root/tests/ui/drop/drop-trait.rs
blob: b160d17cdcb199d799e7dc88ebf88716e7fc8f4e (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 };
}