Skip to content
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

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

Closed
Manishearth opened this issue Mar 6, 2018 · 3 comments
Closed
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. WG-epoch Working group: Epoch (2018) management

Comments

@Manishearth
Copy link
Member

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

@Manishearth Manishearth added the WG-epoch Working group: Epoch (2018) management label Mar 6, 2018
@Centril Centril added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Mar 7, 2018
@nikomatsakis
Copy link
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.

@Manishearth
Copy link
Member Author

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

@Manishearth
Copy link
Member Author

#48801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. WG-epoch Working group: Epoch (2018) management
Projects
None yet
Development

No branches or pull requests

3 participants