]> git.lizzy.rs Git - rust.git/blob - src/test/ui/explicit/explicit-call-to-dtor.fixed
Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23
[rust.git] / src / test / ui / explicit / explicit-call-to-dtor.fixed
1 // run-rustfix
2 struct Foo {
3     x: isize
4 }
5
6 impl Drop for Foo {
7     fn drop(&mut self) {
8         println!("kaboom");
9     }
10 }
11
12 fn main() {
13     let x = Foo { x: 3 };
14     println!("{}", x.x);
15     drop(x);   //~ ERROR explicit use of destructor method
16 }