-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should_implement_trait does not consider function safety. #5413
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
Comments
flip1995
added
good-first-issue
These issues are a good way to get started with Clippy
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
labels
Apr 4, 2020
related #4290 |
rabisg0
added a commit
to rabisg0/rust-clippy
that referenced
this issue
Apr 8, 2020
When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes rust-lang#5413, rust-lang#4290
rabisg0
added a commit
to rabisg0/rust-clippy
that referenced
this issue
Apr 8, 2020
When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes rust-lang#5413, rust-lang#4290
bors
added a commit
that referenced
this issue
Apr 8, 2020
Check fn header along with decl when suggesting to implement trait When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes #5413, #4290 changelog: check fn header along with decl for should_implement_trait
rokob
pushed a commit
to rokob/rust-clippy
that referenced
this issue
Apr 17, 2020
When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes rust-lang#5413, rust-lang#4290
rokob
pushed a commit
to rokob/rust-clippy
that referenced
this issue
Apr 17, 2020
When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes rust-lang#5413, rust-lang#4290
rokob
pushed a commit
to rokob/rust-clippy
that referenced
this issue
Apr 17, 2020
When checking for functions that are potential candidates for trait implementations check the function header to make sure modifiers like asyncness, constness and safety match before triggering the lint. Fixes rust-lang#5413, rust-lang#4290
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
Consider this:
This triggers
should_implement_trait
, which a false positive, asAdd
requires a normal function, not an unsafe one.cargo clippy -V
:The text was updated successfully, but these errors were encountered: