Refine lints about field and method removals to account for Deref/DerefMut
#766
Labels
A-lint
Area: new or existing lint
C-enhancement
Category: raise the bar on expectations
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-mentor
Call for participation: Mentorship is available for this issue.
This issue about trait associated consts and functions acting as a backstop for removed inherent items got me thinking, what about Deref? Is the following breaking if the
// REMOVE
lines are removed?Originally posted by @jw013 in #727 (comment)
The long-term solution we want here is similar to the case of
clippy::correctness
vsclippy::suspicious
:correctness
-flavored lints (on by default, error level) that allowDeref/DerefMut
to be used to replace the removed item.suspicious
-flavored lints (on by default, warning level) that do not allow the above, and never fire if theircorrectness
sibling is already going to fire.More discussion here: #727 (comment)
The
suspicious
-flavored lint is blocked on #58.The
correctness
-flavored lints already exist and can be tweaked, though this is not a good onboarding task! It requires proficiency with the Trustfall query language, so highly recommend writing some other lints first!The text was updated successfully, but these errors were encountered: