-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Create group containing all Rust 2021 edition lints #85894
Comments
This isn't really blocked on #85512, it's just not as useful without it. |
|
@rustbot claim |
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 |
…tsakis Change how edition based future compatibility warnings are handled This fixes rust-lang#85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons. For now `FutureCompatibilityReasons` are limited to three reasons, but we can easily add more. This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary. r? `@m-ou-se`
…tsakis Change how edition based future compatibility warnings are handled This fixes rust-lang#85894 by updating how future compatibility lints work. This makes it more apparent that future compatibility warnings can happen for several different reasons. For now `FutureCompatibilityReasons` are limited to three reasons, but we can easily add more. This also updates the generated warning for FCW's that signal code that will error in a future edition. This makes the diagnostics between FCWs at edition boundaries more distinct from those not happening at an edition boundary. r? `@m-ou-se`
Re-opening since there's still a few left to do. |
We might want to change the name of some of these lints, if we still can. E.g. |
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 Plurality |
@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. |
We should rename |
This prefix ( |
…atible, r=nikomatsakis Turn non_fmt_panic into a future_incompatible edition lint. This turns the `non_fmt_panic` lint into a future_incompatible edition lint, so it becomes part of the `rust_2021_compatibility` group. See rust-lang#85894. This lint produces both warnings about semantical changes (e.g. `panic!("{{")`) and things that will become hard errors (e.g. `panic!("{")`). So I added a `explain_reason: false` that supresses the default "this will become a hard error" or "the semantics will change" message, and instead added a note depending on the situation. (cc `@rylev)` r? `@nikomatsakis`
Rename some Rust 2021 lints to better names Based on conversation in rust-lang#85894. Rename a bunch of Rust 2021 related lints: Lints that are officially renamed because they are already in beta or stable: * `disjoint_capture_migration` => `rust_2021_incompatible_closure_captures` * `or_patterns_back_compat` => `rust_2021_incompatible_or_patterns` * `non_fmt_panic` => `non_fmt_panics` Lints that are renamed but don't require any back -compat work since they aren't yet in stable: * `future_prelude_collision` => `rust_2021_prelude_collisions` * `reserved_prefix` => `rust_2021_token_prefixes` Lints that have been discussed but that I did not rename: * ~`non_fmt_panic` and `bare_trait_object`: is making this plural worth the headache we might cause users?~ * `array_into_iter`: I'm unsure of a good name and whether bothering users with a name change is worth it. r? `@nikomatsakis`
With #86717 merged, we can close this issue. |
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.
The text was updated successfully, but these errors were encountered: