075c212849
Add a lint to warn on `T: Drop` bounds **What it does:** Checks for generics with `std::ops::Drop` as bounds. **Why is this bad?** `Drop` bounds do not really accomplish anything. A type may have compiler-generated drop glue without implementing the `Drop` trait itself. The `Drop` trait also only has one method, `Drop::drop`, and that function is by fiat not callable in user code. So there is really no use case for using `Drop` in trait bounds. **Known problems:** None. **Example:** ```rust fn foo<T: Drop>() {} ``` Fixes #3773 |
||
---|---|---|
.. | ||
auxiliary | ||
ui | ||
ui-toml | ||
compile-test.rs | ||
dogfood.rs | ||
matches.rs | ||
missing-test-files.rs | ||
needless_continue_helpers.rs | ||
versioncheck.rs |