]> git.lizzy.rs Git - rust.git/blob - src/test/ui/drop/drop-trait-generic.rs
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / drop / drop-trait-generic.rs
1 // run-pass
2 #![allow(dead_code)]
3 struct S<T> {
4     x: T
5 }
6
7 impl<T> ::std::ops::Drop for S<T> {
8     fn drop(&mut self) {
9         println!("bye");
10     }
11 }
12
13 pub fn main() {
14     let _x = S { x: 1 };
15 }