-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Add Removed Library Features API and tests (unstable_removed)
#146382
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
Conversation
|
Some changes occurred to the CTFE machinery Some changes occurred in compiler/rustc_attr_parsing Some changes occurred to constck cc @fee1-dead Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_hir/src/attrs |
|
rustbot has assigned @petrochenkov. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
r? jdonszelmann |
|
(btw, we usually rebase onto master, not merge master into feature branches. we can't merge like this) |
e2abc88 to
033f7a3
Compare
|
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
| } else if let Some(v) = super::util::parse_version(s) { | ||
| since_opt = Some(StableSince::Version(v)); | ||
| } else { | ||
| let err = cx.emit_err(session_diagnostics::InvalidSince { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just error out in this case instead of putting a magic symbol in. If you do want to continue, return None but using sym::err doesn't seem like a great idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is not yet addressed
033f7a3 to
f733312
Compare
|
|
@rustbot author (I'll review more when CI passes) |
This comment has been minimized.
This comment has been minimized.
ef30913 to
09e1210
Compare
|
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
09e1210 to
5a19abe
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
I would recommend using the |
ed5a33d to
c58a6c9
Compare
unstable_removed)unstable_removed)
This comment was marked as spam.
This comment was marked as spam.
|
Adding a logging system is not a fix for an ICE, and we don't just print things in the middle of the compiler. (In response to your latest commit). It seems, though I might be wrong, that you use a lot of AI generated code, or at the very least submit code that is not ready to be part of the compiler. There are many things I could comment on but in the current state I don't want to spend any more time on it since there are still many very obvious problems. I recommend you review your own diff by yourself and make another pass on it yourself. However, if after that it's still like this I'm going to close this PR |
|
@rustbot author |
|
I also see no reason why we would even need a new |
Add Removed Library Features API and tests (
unstable_removed)Summary
This PR introduces explicit test coverage for removed library features,
ensuring that
rustcreports the correct diagnostic (E0557) when such afeature is used.
A dummy feature
unstable_removedwas added to exercise the mechanism.The error message now includes both the version in which the feature was
removed (
1.89.0) and the removal reason (test_reason).Changes
1. Compiler Internals
rustc_session::Sessionto carry aremoved_features: Vec<RemovedFeature>.since+reason).2. Diagnostics
rustcnow emits:with additional notes for the removal version and reason.
3. New UI Test
tests/ui/stability-attribute/removed-library-feature.rs:.stderrfile to assert:Motivation
Testing
./x test tests/ui/stability-attribute/removed-library-feature.rs -- --blessFuture Work
Issue: #141617