-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
The lint message for the bool_assert_comparison
lint currently look like this:
warning: used `assert_eq!` with a literal bool
--> src/main.rs:5:5
|
5 | assert_eq!(some_bool_expression, false);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(..)`
I think the suggestion can be improved to include the actual expression that should be put in the assert!
instead of just having the placeholder ..
.
The text for the suggestion can be retrieved with functions from clippy_utils::source
.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-styleLint: Belongs in the style lint groupLint: Belongs in the style lint groupgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy