Skip to content

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Jan 11, 2025

In #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 #135272.

Idk if anyone has a preference for just keeping all the abstractions here in case anyone needs them in the future 🤷‍♀️

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2025

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 11, 2025
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 12, 2025

📌 Commit 4de8cef has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2025
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 🤷‍♀️
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
@bors bors merged commit fad3039 into rust-lang:master Jan 13, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 13, 2025
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 🤷‍♀️
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 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
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants