-
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
Rename eval_order_dependence
to mixed_read_write_expression
, move to nursery
#8621
Conversation
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
I'm not sure if we should deprecate the lint just because the evaluation order has been defined. Looking at the example from the lint description, I would still expect this to be linted or later mark that as confusion in the code review. // Example from the lint description
let a = {
x = 1;
1
} + x; CC: @rust-lang/clippy |
I also think deprecation is too far a step. It may be debatable if |
Two reasons for the deprecation.
If not deprecating it, I would say move it to the nursery with an issue open to deal with what should happen to it. |
Given the background, I agree, it should at least be moved and renamed. Having a lint for the style from the example sounds good, but we can add that afterwards. 👍 |
Any nominations for a new name? If not I'll just update the PR to move it into the nursery with a note to deal with it later. |
I think |
☔ The latest upstream changes (presumably #8630) made this pull request unmergeable. Please resolve the merge conflicts. |
Maybe |
I think this sounds like a plan. @Jarcho Could you rename the lint (I like |
2021198
to
2302909
Compare
Had to add the renamed lints to the link list in the changelog. Do we want to have that link to the page for the new name? Currently I have it using the page for the old name. It could be either [`old_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#old_name or [`old_name`]: https://rust-lang.github.io/rust-clippy/master/index.html#new_name |
You can just remove the |
Deprecated lints are already in the link list. This keeps renamed lints consistent with those. The links for deprecated lints aren't useful as they aren't in the docs. (They should be, but that's a different issue) |
Adding renamed lints as an alias with a note to our lint list is still on my mind, somewhere at the bottom of my todo list 😅 |
Deprecated lints are in the docs if you explicitly filter for them with the lint-group filter: https://rust-lang.github.io/rust-clippy/master/index.html#assign_ops (I consider it a bug that it doesn't show up with this link, because the filter excludes it. I think we have an issue open for this or at least talked about it before? 🤔) Renamed lints can't be in the documentation (currently), because the old lint isn't defined anywhere anymore (except for its name). |
☔ The latest upstream changes (presumably #8796) made this pull request unmergeable. Please resolve the merge conflicts. |
eval_order_dependence
eval_order_dependence
to mixed_read_write_expression
, move to nursery
I was a bit discombobulated by the added links in the lint list, but I now understand. Sorry for taking so long to review. r=me after rebase |
✌️ @Jarcho can now approve this pull request |
f31250a
to
f7378da
Compare
@bors r+ |
📌 Commit f7378da has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
As per the reference evaluation order is now defined.
I'm pretty sure rust always compiled with this evaluation order anyways so there's no reason the put an msrv limit on the lint.
changelog: Rename
eval_order_dependence
tomixed_read_write_expression
, move to nursery