Skip to content

Create group containing all Rust 2021 edition lints #85894

Closed

Description

@nikomatsakis

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.

Activity

  1. changed the title [-]Group containing all Rust 2021 edition lints[/-] on Jun 1, 2021
  2. nikomatsakis commented on Jun 1, 2021

    @nikomatsakis
    ContributorAuthor

    This isn't really blocked on #85512, it's just not as useful without it.

  3. m-ou-se commented on Jun 1, 2021

    @m-ou-se
    Member
    1. Prelude changes:
    2. Panic consistency:
    3. Lints -> hard errors
      • bare_trait_objects
      • ellipsis_inclusive_range_patterns
    4. Disjoint captures
    5. Cargo resolver 2
    6. IntoIterator for arrays
      • array_into_iter
    7. Or patterns
      • or_patterns_back_compat
    8. Reserving syntax
  4. rylev commented on Jun 4, 2021

    @rylev
    Contributor

    @rustbot claim

  5. inquisitivecrystal commented on Jun 5, 2021

    @inquisitivecrystal
    Contributor

    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

  6. added
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jun 5, 2021
  7. added a commit that references this issue on Jun 24, 2021
  8. added 2 commits that reference this issue on Jun 25, 2021
  9. m-ou-se commented on Jun 27, 2021

    @m-ou-se
    Member

    Re-opening since there's still a few left to do.

  10. m-ou-se commented on Jun 27, 2021

    @m-ou-se
    Member

    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.

  11. inquisitivecrystal commented on Jun 28, 2021

    @inquisitivecrystal
    Contributor

    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

    Plurality
    future_prelude_collision -> future_prelude_collisions
    non_fmt_panic -> non_fmt_panics
    bare_trait_object -> bare_trait_objects
    reserved_prefix -> reserved_prefixes

  12. m-ou-se commented on Jun 28, 2021

    @m-ou-se
    Member

    @inquisitivecrystal Thank you! That's very helpful.

    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.

  13. nikomatsakis commented on Jun 28, 2021

    @nikomatsakis
    ContributorAuthor

    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?

  14. nikomatsakis commented on Jun 28, 2021

    @nikomatsakis
    ContributorAuthor

    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.

  15. added a commit that references this issue on Jun 28, 2021
  16. added a commit that references this issue on Jul 7, 2021
  17. rylev commented on Jul 7, 2021

    @rylev
    Contributor

    With #86717 merged, we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-edition-2021Area: The 2021 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions