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
{{ message }}
Repository navigation
Create group containing all Rust 2021 edition lints #85894
As follow up to #85512, we need to create a group containing all "Rust 2021 migration"-related lints. Let's start by logging them in the comments here.
If we don't have a way to add lint aliases, we should add that. I've come up with some possible lint renamings, based on the relevant guidelines, though there are quite possibly better ones that still comply with the guidelines. As an aside, why are so many lints being added with noncompliant names?
Meaning or_patterns_back_compat -> pipes_after_pat_metavariables array_into_iter -> ambiguous_array_into_iter_derefs disjoint_capture_migration -> disjoint_capture_drop_reorder (existing lint which I presume is related, preferably and an "ing" at the end to make it sound right with allow/deny/forbid), or maybe something like reliance_on_joint_captures
We'll have to check which of these we can still change without causing too much churn.
As an aside, why are so many lints being added with noncompliant names?
It just seems that many contributors and reviewers aren't aware of the guidelines. (I wasn't aware until someone pointed it out after I added a lint with a noncompliant name.)
disjoint_capture_drop_reorder
This one also warns about changed Sync/Send implementations on closures. Might make it a bit tricky to find a proper name for it.
Plurality
Oh, heh, I completely missed that part of the guideline.
We should rename disjoint_capture_migration, but disjoint_capture_drop_reorder doesn't sound right because it's incomplete. I think I like something like rust_2021_incompatible_closure_captures?
This prefix (rust_2021_incompatible) makes sense for things that are "allow by default" -- that is, something you wouldn't warn about except as part of a migration.
Activity
[-]Group containing all Rust 2021 edition lints[/-]nikomatsakis commentedon Jun 1, 2021
This isn't really blocked on #85512, it's just not as useful without it.
m-ou-se commentedon Jun 1, 2021
future_prelude_collision(Addfuture_prelude_collisionlint #85707)non_fmt_panic(Turn non_fmt_panic into a future_incompatible edition lint. #86671)bare_trait_objectsellipsis_inclusive_range_patternsdisjoint_capture_migration(Make disjoint_capture_migration an edition lint. #86673)cargo fix --edition: Add report ifcargo fix --editionchanges features. cargo#9268array_into_iteror_patterns_back_compatreserved_prefix(Reserve prefixed identifiers and literals (RFC 3101) #85359)rylev commentedon Jun 4, 2021
@rustbot claim
inquisitivecrystal commentedon Jun 5, 2021
Sigh. I apologize for the double message (now deleted). Messed up the command format, and then I couldn't tell why it wasn't working.
@rustbot label +A-lint +T-compiler
Rollup merge of rust-lang#86330 - rylev:update-fcw-handling, r=nikoma…
Rollup merge of rust-lang#86330 - rylev:update-fcw-handling, r=nikoma…
Rollup merge of rust-lang#86330 - rylev:update-fcw-handling, r=nikoma…
m-ou-se commentedon Jun 27, 2021
Re-opening since there's still a few left to do.
m-ou-se commentedon Jun 27, 2021
We might want to change the name of some of these lints, if we still can. E.g.
deny(disjoint_capture_migration)doesn't sound like what it does.inquisitivecrystal commentedon Jun 28, 2021
If we don't have a way to add lint aliases, we should add that. I've come up with some possible lint renamings, based on the relevant guidelines, though there are quite possibly better ones that still comply with the guidelines. As an aside, why are so many lints being added with noncompliant names?
Meaning
or_patterns_back_compat->pipes_after_pat_metavariablesarray_into_iter->ambiguous_array_into_iter_derefsdisjoint_capture_migration->disjoint_capture_drop_reorder(existing lint which I presume is related, preferably and an "ing" at the end to make it sound right with allow/deny/forbid), or maybe something likereliance_on_joint_capturesPlurality
future_prelude_collision->future_prelude_collisionsnon_fmt_panic->non_fmt_panicsbare_trait_object->bare_trait_objectsreserved_prefix->reserved_prefixesm-ou-se commentedon Jun 28, 2021
@inquisitivecrystal Thank you! That's very helpful.
We'll have to check which of these we can still change without causing too much churn.
It just seems that many contributors and reviewers aren't aware of the guidelines. (I wasn't aware until someone pointed it out after I added a lint with a noncompliant name.)
This one also warns about changed Sync/Send implementations on closures. Might make it a bit tricky to find a proper name for it.
Oh, heh, I completely missed that part of the guideline.
nikomatsakis commentedon Jun 28, 2021
We should rename
disjoint_capture_migration, butdisjoint_capture_drop_reorderdoesn't sound right because it's incomplete. I think I like something likerust_2021_incompatible_closure_captures?nikomatsakis commentedon Jun 28, 2021
This prefix (
rust_2021_incompatible) makes sense for things that are "allow by default" -- that is, something you wouldn't warn about except as part of a migration.Rollup merge of rust-lang#86671 - m-ou-se:non-fmt-panic-future-incomp…
Rollup merge of rust-lang#86717 - rylev:rename, r=nikomatsakis
rylev commentedon Jul 7, 2021
With #86717 merged, we can close this issue.