-
Notifications
You must be signed in to change notification settings - Fork 1.8k
identity_op
: add parenthesis to suggestions where required
#8786
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
Conversation
r? @Manishearth (rust-highfive has picked a reviewer for you, use r? to override) |
r? @dswij I hope it's okay to steal this one from you @Manishearth 🙃 |
yeah please go for it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This is a nice improvement for sure, thank you!
r? @xFrednet
// ensure we're checking against the leftmost expression of `right` | ||
// | ||
// ~~~ `lhs` | ||
// 0 + {4} * 2 | ||
// ~~~~~~~ `right` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this kind of documentation ^^
📌 Commit ee8fae3 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: [
identity_op
]: add parenthesis to suggestions where requiredFollow up to #8730, wraps the cases we can't lint as-is in parenthesis rather than ignoring them
Catches a couple new FPs with mixed operator precedences and
as
castsThe suggestions are now applied using
span_lint_and_sugg
rather than appearing in just the message and have arun-rustfix
test