rust/tests/ui/drop/drop-trait-generic.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
197 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
struct S<T> {
x: T
}
impl<T> ::std::ops::Drop for S<T> {
2013-09-17 01:18:07 +00:00
fn drop(&mut self) {
println!("bye");
}
}
pub fn main() {
2015-01-25 21:05:03 +00:00
let _x = S { x: 1 };
}