mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-20 18:13:36 +00:00
23 lines
262 B
Rust
23 lines
262 B
Rust
#![warn(clippy::empty_drop)]
|
|
#![allow(unused)]
|
|
|
|
// should cause an error
|
|
struct Foo;
|
|
|
|
|
|
|
|
// shouldn't cause an error
|
|
struct Bar;
|
|
|
|
impl Drop for Bar {
|
|
fn drop(&mut self) {
|
|
println!("dropping bar!");
|
|
}
|
|
}
|
|
|
|
// should error
|
|
struct Baz;
|
|
|
|
|
|
|
|
fn main() {}
|