We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb1c0b6 commit 2da7f08Copy full SHA for 2da7f08
tests/ui/drop_bounds.rs
@@ -1,4 +1,8 @@
1
#![allow(unused)]
2
fn foo<T: Drop>() {}
3
-fn bar<T>() where T: Drop {}
+fn bar<T>()
4
+where
5
+ T: Drop,
6
+{
7
+}
8
fn main() {}
tests/ui/drop_bounds.stderr
@@ -7,10 +7,10 @@ LL | fn foo<T: Drop>() {}
= note: #[deny(clippy::drop_bounds)] on by default
9
error: Bounds of the form `T: Drop` are useless. Use `std::mem::needs_drop` to detect if a type has drop glue.
10
- --> $DIR/drop_bounds.rs:3:22
+ --> $DIR/drop_bounds.rs:5:8
11
|
12
-LL | fn bar<T>() where T: Drop {}
13
- | ^^^^
+LL | T: Drop,
+ | ^^^^
14
15
error: aborting due to 2 previous errors
16
0 commit comments