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

impl<T> ::std::ops::Drop for S<T> {
    fn drop(&mut self) {
        println!("bye");
    }
}

pub fn main() {
    let _x = S { x: 1 };
}