-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 Nov 19, 2024
-
This moves stability structs' `feature` fields into `StabilityLevel::Unstable` and `ConstStabilityLevel::Unstable`, in preparation to support 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 27dadd4 - Browse repository at this point
Copy the full SHA 27dadd4View 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 459ff1b - Browse repository at this point
Copy the full SHA 459ff1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 729ced5 - Browse repository at this point
Copy the full SHA 729ced5View commit details -
Make unstable library feature errors translatable
Translation is in an awkward position, but this provides a similar interface for both errors and soft-unstable lints, and enables the use of `DiagSymbolList` for simplifying error message construction.
Configuration menu - View commit details
-
Copy full SHA for 039e6de - Browse repository at this point
Copy the full SHA 039e6deView commit details -
compiler: support multiple stability attributes on items
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. This includes the clarified/fixed const-unstable semantics that were previously in a different commit.
Configuration menu - View commit details
-
Copy full SHA for 67f9341 - Browse repository at this point
Copy the full SHA 67f9341View commit details -
Configuration menu - View commit details
-
Copy full SHA for e614f5e - Browse repository at this point
Copy the full SHA e614f5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7968f0 - Browse repository at this point
Copy the full SHA c7968f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a966f5e - Browse repository at this point
Copy the full SHA a966f5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for edf10f8 - Browse repository at this point
Copy the full SHA edf10f8View commit details -
Add sanity checks for
reason
andsoft
on unstable attributes`reason` must appear at most once: it's the reason for the item being unstable, rather than a particular feature. This simplifies diagnostic formatting. `soft` must either be on all or no unstable attributes: it doesn't make sense for something to be partially soft, and allowing inconsistent softness markers would risk an item accidentally becoming properly unstable as its features stabilize.
Configuration menu - View commit details
-
Copy full SHA for b23f28d - Browse repository at this point
Copy the full SHA b23f28dView commit details