-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support multiple stability attributes on items #131824
base: master
Are you sure you want to change the base?
Commits on Oct 17, 2024
-
move stability structs'
feature
fields intoStabilityLevel::Unstable
This is a refactor for supporting multiple unstable attributes on items. Seemingly, the `feature` field isn't used with the `StabilityLevel::Stable` variant, so I haven't included it. `rustc_passes::lib_features` uses the 'feature' meta-item for 'stable' attributes, but it extracts them itself, rather than relying on `rustc_attr`.
Configuration menu - View commit details
-
Copy full SHA for 6f4aa4d - Browse repository at this point
Copy the full SHA 6f4aa4dView commit details -
factor out some commonalities in the
find_stability
family of funct……ions the logic for adding unstable attrs gets a bit messier when supporting multiple instances thereof. this keeps that from being duplicated in 3 places.
Configuration menu - View commit details
-
Copy full SHA for f559f57 - Browse repository at this point
Copy the full SHA f559f57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 487f740 - Browse repository at this point
Copy the full SHA 487f740View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42b461e - Browse repository at this point
Copy the full SHA 42b461eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a8a36a9 - Browse repository at this point
Copy the full SHA a8a36a9View commit details -
find_stability
: don't give up when emitting "multiple stability lev……els" errors this makes things a little cleaner. since multiple stability levels are allowed, I think it makes sense too.
Configuration menu - View commit details
-
Copy full SHA for 4a8a6cc - Browse repository at this point
Copy the full SHA 4a8a6ccView commit details -
support multiple stability attributes (a mix of stable and unstable)
An item is unstable if it has any unstable attributes, to make it easier to track which features library items depended on as they stabilize. This changes the text for E0544. Unfortunately, the example doesn't make much sense anymore. The way this merges stability levels together is made to work for stability-checking and rustdoc; as far as I can tell, only `rustc_passes::lib_features` needs them separate, and it extracts them itself.
Configuration menu - View commit details
-
Copy full SHA for 35fd749 - Browse repository at this point
Copy the full SHA 35fd749View commit details -
use backticks instead of single quotes when reporting "use of unstabl…
…e library feature `feature`" This is consistent with all other diagnostics I could find containing features and enables the use of `DiagSymbolList` for generalizing diagnostics for unstable library features to multiple features.
Configuration menu - View commit details
-
Copy full SHA for 8f284de - Browse repository at this point
Copy the full SHA 8f284deView commit details -
Improve diagnostics for the use of unstable library features
- only emits one error/lint (instead of one per missing feature) per usage of unstable and body-unstable items - only emits one future-name-collision lint (instead of one per missing feature) for unstable trait items - makes diagnostics for unstable, soft-unstable, const-unstable, and body-unstable library features translatable, using common subdiagnostic structs. - adds notes with features, reasons, and issue links to const-unstability errors - adds notes with issue links to soft_unstable lints - on nightly, adds `#![feature]` crate attr help to soft_unstable lints - on nightly, adds compiler-upgrade-suggestion notes to const-unstable and soft_unstable diagnostics
Configuration menu - View commit details
-
Copy full SHA for 2434969 - Browse repository at this point
Copy the full SHA 2434969View commit details -
rustc_const_eval: remove old FIXME, per review comment on previous PR
At least one test relies on this behavior, so I think the description is still correct.
Configuration menu - View commit details
-
Copy full SHA for 14b8556 - Browse repository at this point
Copy the full SHA 14b8556View commit details