2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2012-11-28 14:18:51 -08:00
|
|
|
struct S<T> {
|
|
|
|
x: T
|
|
|
|
}
|
|
|
|
|
2013-05-20 17:07:24 -07:00
|
|
|
impl<T> ::std::ops::Drop for S<T> {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {
|
2014-01-09 21:06:55 +11:00
|
|
|
println!("bye");
|
2012-11-28 14:18:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-01-25 22:05:03 +01:00
|
|
|
let _x = S { x: 1 };
|
2012-11-28 14:18:51 -08:00
|
|
|
}
|