-
Notifications
You must be signed in to change notification settings - Fork 13.4k
track the version and PR in which a nightly feature was removed #141619
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
Comments
oh neat, we already track version:
that makes the version part of this quite simple, and we can add pr info later. mentoring instructions: in rust/compiler/rustc_expand/src/config.rs Lines 82 to 89 in 30721b0
note about when the feature was removed.
@rustbot label E-help-wanted E-easy |
@rustbot claim |
For removed feature, the version may be not accurate, is this some kind of historical problem? rust/compiler/rustc_feature/src/lib.rs Lines 33 to 41 in 30721b0
|
hm. ideally we would not give wrong info in the diagnostic. are you willing to go through the git history for each feature one by one and see when it was removed? i think it will not be as bad as it sounds, a github blame view will get you 80% of the info you need because each commit links to the PR it's from (and the PR has a version number). it might also be possible to script this. if you are willing, please note down the PR number as you do this, that will save someone from having to do the work again. |
No problem, I've just submitted #141642 to finish this for now, not sure if we want to merge this PR first before we go back to gradually fixing the diagnostic info. |
Note the version and PR of removed features when using it Fixes rust-lang#141619 I added the diagnostic information. Since all the current version information is present, it prints the version information anyway, as shown in tests/ui. And PR will not print if it is None, we can gradually add the PR links. Split into two commits for easier review. r? compiler cc `@jyn514` Since you're on vocation in the review list, I can't r? you.
Rollup merge of #141642 - xizheyin:issue-141619, r=BoxyUwU Note the version and PR of removed features when using it Fixes #141619 I added the diagnostic information. Since all the current version information is present, it prints the version information anyway, as shown in tests/ui. And PR will not print if it is None, we can gradually add the PR links. Split into two commits for easier review. r? compiler cc ``@jyn514`` Since you're on vocation in the review list, I can't r? you.
Note the version and PR of removed features when using it Fixes rust-lang/rust#141619 I added the diagnostic information. Since all the current version information is present, it prints the version information anyway, as shown in tests/ui. And PR will not print if it is None, we can gradually add the PR links. Split into two commits for easier review. r? compiler cc ``@jyn514`` Since you're on vocation in the review list, I can't r? you.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
Rationale and extra context
this makes it more clear what is going on, and also gives people enough breadcrumbs to find more information. right now it is very hard to find info about removed features without trawling through the code (it took me about 15 minutes just now, and i am both the person who removed this feature and the one who stabilized its replacement).
saying the version also makes it more clear that "removed" is specifically about versions, and tells the person compiling the code that using an older toolchain will likely work. this matters because the person seeing this error is likely not the one who wrote the code, and possibly knows very little about rust's stability policy.
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: