You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sounds like a specialization of #6286, I would like to have one lint for all operators which is configurable. Then we could also have it in the pedantic group. But the implementation will be a bit more work 😅 🙃
Uh oh!
There was an error while loading. Please reload this page.
What it does
Forbid the usage of not operator (
!
) inif $expr
,while $expr
andassert!($expr)
.Use
.not()
instead. (std::ops::Not
)Lint Name
not_operator_used
Category
stylerestriction
Advantage
.not()
is more conspicuous than!
and looks continuous.Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: