Repository navigation
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_ir cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_parsing |
Collaborator
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
fmease
force-pushed
the
cta-migration-mvp
branch
2 times, most recently
from
October 22, 2026 22:39
63fd589 to
0870b5d
Compare
Contributor
|
@rustbot reroll |
fmease
force-pushed
the
cta-migration-mvp
branch
from
October 23, 2026 19:58
0870b5d to
18253f3
Compare
Collaborator
|
This PR was rebased onto a different main 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 branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quoting from https://rustc-dev-guide.rust-lang.org/guides/editions.html#migration-lints:
However, as it stands we can't just stabilize feature
checked_type_aliasesin the next edition because it would break the world (in the next edition); generally speaking, arbitrary implicitly unchecked type aliases (i.e., what we have today on stable) can't just become checked type aliases without breakage. E.g.,type_alias_boundsand be writing explicit bounds which would now be enforced at usage sites which could lead to local or downstream breakages (i.e., a major change wrt. SemVer)Sizedbounds would now be enforced at usage sites which could lead to local or downstream breakagesprivate_interfaceswhich might be set todenyor stricter leading to (soft) breakageTherefore, there must be a mechanism to define unchecked type aliases in the next edition / under feature
checked_type_aliases. This mechanism could then be used by the edition migration lint for (unchecked) type aliases that cannot be turned into a checked one without breaking the local crate or downstream consumers thereof. Of course, the lint should try to avoid that mechanism where possible.This PR introduces attribute
#[rustc_unchecked_type_alias](placeholder name) gated behind new unstable featuremarked_unchecked_type_aliasesto be the aforementioned mechanism. Moreover, it introduces allow-by-default edition migration lintunmarked_unchecked_type_aliasesgated behind the same feature. The target edition in question is our dummyfuturewhich was added specifically for cases like this. Note that this PR only contains the MVP of the migration lint: Its impl won't try to figure out if adding#[rustc_unchecked_type_alias]would actually be necessary since that's most likely relatively involved & can be done iteratively.Part of #112792.
(No LLM was or will be used by me during the entire creation process of this PR)