diff --git a/tests/ui/drop_bounds.rs b/tests/ui/drop_bounds.rs index baa74037c1a..6d6a9dc0783 100644 --- a/tests/ui/drop_bounds.rs +++ b/tests/ui/drop_bounds.rs @@ -1,4 +1,8 @@ #![allow(unused)] fn foo() {} -fn bar() where T: Drop {} +fn bar() +where + T: Drop, +{ +} fn main() {} diff --git a/tests/ui/drop_bounds.stderr b/tests/ui/drop_bounds.stderr index 15b6ea6a795..cc87913ecb1 100644 --- a/tests/ui/drop_bounds.stderr +++ b/tests/ui/drop_bounds.stderr @@ -7,10 +7,10 @@ LL | fn foo() {} = note: #[deny(clippy::drop_bounds)] on by default error: Bounds of the form `T: Drop` are useless. Use `std::mem::needs_drop` to detect if a type has drop glue. - --> $DIR/drop_bounds.rs:3:22 + --> $DIR/drop_bounds.rs:5:8 | -LL | fn bar() where T: Drop {} - | ^^^^ +LL | T: Drop, + | ^^^^ error: aborting due to 2 previous errors