]> git.lizzy.rs Git - rust.git/commit
Check fn header along with decl when suggesting to implement trait
authorRabi Guha <rabisg@google.com>
Wed, 8 Apr 2020 10:57:58 +0000 (16:27 +0530)
committerRabi Guha <rabisg@google.com>
Wed, 8 Apr 2020 15:54:20 +0000 (21:24 +0530)
commitc2e55341578ae7b8da9a91eb7ae02f805d5b992e
treeaeebe4be61a619085ae8a23bca9656516b336837
parentd342cee78703c46d9df09088f9fb99ba85d021ae
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
clippy_lints/src/methods/mod.rs
tests/ui/methods.rs
tests/ui/methods.stderr