]> git.lizzy.rs Git - rust.git/blob - tests/ui/drop_bounds.stderr
Add a lint to warn on `T: Drop` bounds
[rust.git] / tests / ui / drop_bounds.stderr
1 error: Bounds of the form `T: Drop` are useless. Use `std::mem::needs_drop` to detect if a type has drop glue.
2   --> $DIR/drop_bounds.rs:2:11
3    |
4 LL | fn foo<T: Drop>() {}
5    |           ^^^^
6    |
7    = note: #[deny(clippy::drop_bounds)] on by default
8
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
11    |
12 LL | fn bar<T>() where T: Drop {}
13    |                      ^^^^
14
15 error: aborting due to 2 previous errors
16