]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/empty_drop.fixed
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / empty_drop.fixed
1 // run-rustfix
2 #![warn(clippy::empty_drop)]
3 #![allow(unused)]
4
5 // should cause an error
6 struct Foo;
7
8
9
10 // shouldn't cause an error
11 struct Bar;
12
13 impl Drop for Bar {
14     fn drop(&mut self) {
15         println!("dropping bar!");
16     }
17 }
18
19 // should error
20 struct Baz;
21
22
23
24 fn main() {}