]>
Commit | Line | Data |
---|---|---|
5869c6ff | 1 | // run-rustfix |
223e47cc | 2 | struct Foo { |
1a4d82fc | 3 | x: isize |
223e47cc LB |
4 | } |
5 | ||
6 | impl Drop for Foo { | |
1a4d82fc JJ |
7 | fn drop(&mut self) { |
8 | println!("kaboom"); | |
223e47cc LB |
9 | } |
10 | } | |
11 | ||
12 | fn main() { | |
13 | let x = Foo { x: 3 }; | |
5869c6ff | 14 | println!("{}", x.x); |
1a4d82fc | 15 | x.drop(); //~ ERROR explicit use of destructor method |
223e47cc | 16 | } |