Skip to content

Commit

Permalink
drop_bounds: make lint adhere to lint message convention
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Aug 10, 2020
1 parent 590b91d commit 0db5cb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/drop_bounds.rs
Expand Up @@ -33,11 +33,11 @@ declare_clippy_lint! {
/// ```
pub DROP_BOUNDS,
correctness,
"Bounds of the form `T: Drop` are useless"
"bounds of the form `T: Drop` are useless"
}

const DROP_BOUNDS_SUMMARY: &str = "Bounds of the form `T: Drop` are useless. \
Use `std::mem::needs_drop` to detect if a type has drop glue.";
const DROP_BOUNDS_SUMMARY: &str = "bounds of the form `T: Drop` are useless, \
use `std::mem::needs_drop` to detect if a type has drop glue";

declare_lint_pass!(DropBounds => [DROP_BOUNDS]);

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/drop_bounds.stderr
@@ -1,12 +1,12 @@
error: Bounds of the form `T: Drop` are useless. Use `std::mem::needs_drop` to detect if a type has drop glue.
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:2:11
|
LL | fn foo<T: Drop>() {}
| ^^^^
|
= 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.
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:5:8
|
LL | T: Drop,
Expand Down

0 comments on commit 0db5cb1

Please sign in to comment.