rustc_feature: Separate "renamed" features from "removed" features#155129
rustc_feature: Separate "renamed" features from "removed" features#155129nik-rev wants to merge 2 commits intorust-lang:mainfrom
rustc_feature: Separate "renamed" features from "removed" features#155129Conversation
|
rustbot has assigned @jdonszelmann. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
07786ce to
f970aca
Compare
This comment has been minimized.
This comment has been minimized.
f970aca to
465bdd7
Compare
This comment has been minimized.
This comment has been minimized.
465bdd7 to
47f4436
Compare
This comment has been minimized.
This comment has been minimized.
47f4436 to
664fbe8
Compare
This comment has been minimized.
This comment has been minimized.
abdc8a8 to
0c0cf8f
Compare
0c0cf8f to
1876340
Compare
| code = "{new_name}", | ||
| applicability = "machine-applicable" | ||
| )] | ||
| #[label("feature was renamed")] |
There was a problem hiding this comment.
this label duplicates a message from diag
There was a problem hiding this comment.
old diagnostic had the same label and diagnostic message, so I just mirrored that:
- error[E0557]: feature has been removed
+ error[E0557]: feature was renamed
--> $DIR/feature-gate-sanitize.rs:1:12
|
LL | #![feature(no_sanitize)]
- | ^^^^^^^^^^^ feature has been removed
+ | ^^^^^^^^^^^
+ | |
+ | feature was renamed
+ | help: update to the new name: `sanitize`There was a problem hiding this comment.
yeah, let's drop it from both in a follow up, or remvoe it from renamed now and from removed in a follow up, smth like this
There was a problem hiding this comment.
(this review not for this test specific, but i need to put it somewhere, so just random file)
we need to add a //@ run-rustfix test, to check that machine-applicable fix works when applied
| /// Allows `#[no_coverage]` on functions. | ||
| /// The feature was renamed to `coverage_attribute` and the attribute to `#[coverage(on|off)]` | ||
| (renamed, no_coverage => coverage_attribute, "1.74.0", Some(84605), 114656), | ||
| // Allows the use of `no_sanitize` attribute. |
Co-authored-by: Kivooeo <75776246+Kivooeo@users.noreply.github.com>
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
There are quite a few "renamed" features that are grouped in the same category as "removed".
So I've split them up into a separate
renamed.rsfile, and added a new category for "Renamed" features.This has the following advantages:
tidyscript is updated to check that the new feature names actually exist.