Skip to content

Provide a way to distinguish between "breakage" and "idiom" epoch lints? #48796

Closed

Description

@Manishearth

Currently there's an epoch_2018 lint group which contains (will contain) all the lints that relate to the 2018 epoch.

However, there are two kinds of epoch lints: There's the "this is going to break please fix" kind, and there's the "this is now idiomatic in the new epoch, try it!" kind. Most likely for the 2018 epoch the former will only be the keyword lint, and all the other lints will be idiom lints.

I wonder if we should be providing a lint group for just the "breaking change" lints as well, so that people can get code working on the new epoch easily (running tons of lints increases the chance of cases where e.g. two lints try to modify the same area of code, so only one works -- we can't completely automate rustfix when there's a high concentration of lints).

Having lints in multiple groups is a bit broken in rustc IIRC so we may need to be careful about this.

On a related note, we may need a way to say -Awarnings -Wepoch_2018 -- currently -Awarnings turns off all warnings period, and cannot be overridden (you can do -Depoch_2018 to make those lints work)

cc @nikomatsakis

Activity

  1. added
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    on Mar 7, 2018
  2. nikomatsakis commented on Mar 7, 2018

    @nikomatsakis
    Contributor

    Most likely for the 2018 epoch the former will only be the keyword lint

    Nit: Also the #46906 lint I suppose, maybe a few other minor things.

  3. Manishearth commented on Mar 8, 2018

    @Manishearth
    MemberAuthor

    I decided to make bare_trait_object and unreachable_pub be regular lints -- we should put them under a separate lint group if we wish (rust2018_idioms perhaps). Thoughts?

    The epoch lint functionality will be restricted to things like tyvar_behind_raw_pointer and keyword lints

  4. Manishearth commented on Mar 27, 2018

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.WG-epochWorking group: Epoch (2018) management

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions