rust/clippy_lints
Michael Howell 2df14c3701 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>() {}
```
2019-02-17 22:53:08 -07:00
..
src Add a lint to warn on `T: Drop` bounds 2019-02-17 22:53:08 -07:00
Cargo.toml chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1 2019-01-25 21:53:44 +01:00
README.md rust-lang-nursery/rust-clippy => rust-lang/rust-clippy 2018-11-22 04:40:09 +01:00

README.md

This crate contains Clippy lints. For the main crate, check crates.io or GitHub.