-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
De-abstract tagged ptr and make it covariant #135383
Merged
Merged
Conversation
This file contains 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
rustbot has assigned @compiler-errors. Use |
fbstj
reviewed
Jan 12, 2025
compiler-errors
approved these changes
Jan 12, 2025
@bors r+ |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jan 12, 2025
…rors De-abstract tagged ptr and make it covariant In rust-lang#135272 I needed to use a tagged ptr in `hir::TyKind` in order to not regress hir type sizes. Unfortunately the existing `CopyTaggedPtr` abstraction is insufficient as it makes the `'hir` lifetime invariant. I spent some time trying to keep existing functionality while making it covariant but in the end I realised that actually we dont use *any* of this code *anywhere* in rustc, so I've just removed everything and replaced it with a much less general abstraction that is suitable for what I need in rust-lang#135272. Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷♀️
This was referenced Jan 12, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 12, 2025
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#135348 (rustdoc-json: Include items in stripped modules in `Crate::paths`.) - rust-lang#135365 (Update the explanation for why we use box_new in vec!) - rust-lang#135383 (De-abstract tagged ptr and make it covariant) - rust-lang#135401 (Remove some empty expected files to fix blessing) - rust-lang#135406 (Update unstable lint docs to include required feature attributes) - rust-lang#135407 (Deny various clippy lints) - rust-lang#135411 (run_make_support: add `#![warn(unreachable_pub)]`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 13, 2025
Rollup merge of rust-lang#135383 - BoxyUwU:cov_tag_ptr, r=compiler-errors De-abstract tagged ptr and make it covariant In rust-lang#135272 I needed to use a tagged ptr in `hir::TyKind` in order to not regress hir type sizes. Unfortunately the existing `CopyTaggedPtr` abstraction is insufficient as it makes the `'hir` lifetime invariant. I spent some time trying to keep existing functionality while making it covariant but in the end I realised that actually we dont use *any* of this code *anywhere* in rustc, so I've just removed everything and replaced it with a much less general abstraction that is suitable for what I need in rust-lang#135272. Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷♀️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
In #135272 I needed to use a tagged ptr in
hir::TyKind
in order to not regress hir type sizes. Unfortunately the existingCopyTaggedPtr
abstraction is insufficient as it makes the'hir
lifetime invariant.I spent some time trying to keep existing functionality while making it covariant but in the end I realised that actually we dont use any of this code anywhere in rustc, so I've just removed everything and replaced it with a much less general abstraction that is suitable for what I need in #135272.
Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷♀️