Skip to content

Move LateParamRegion to rustc_type_ir - #160986

Open
Jamesbarford wants to merge 2 commits into
rust-lang:mainfrom
Jamesbarford:chore/move-late-param-region
Open

Move LateParamRegion to rustc_type_ir#160986
Jamesbarford wants to merge 2 commits into
rust-lang:mainfrom
Jamesbarford:chore/move-late-param-region

Conversation

@Jamesbarford

@Jamesbarford Jamesbarford commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

View all comments

Move LateParamRegion to rustc_type_ir. As per feedback, I created a TrivialLiftImpls! mirroring rustc_middle's variant which is creates an identity function for lift_to_interner(...).

Spun off from; #160509

r? @lcnr

@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 Aug 12, 2026
@rust-log-analyzer

This comment has been minimized.

@Jamesbarford
Jamesbarford force-pushed the chore/move-late-param-region branch from aab6014 to 3103e42 Compare August 12, 2026 14:27
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_type_ir/src/sty/mod.rs Outdated

@lcnr lcnr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor question, otherwise r=me

cc @ada4a @ChayimFriedman2

View changes since this review

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

I explicitly said that I don't want to move those to rustc_type_ir. Our implementation of those is different and expected to diverge more.

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

Oh I only said about EarlyParamRegion, but this is the same, as well as the bound regions:

Moving methods is good, but I don't want to move EarlyParamRegion. rust-analyzer uses a different representation (a def id instead of Symbol name), and we'd like to change it further (only an index).

#160220 (comment)

@lcnr

lcnr commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

hm, alright 🤔 I guess only move LateParamRegion but keep LateParaMRegionKind as an assoc type then?

@lcnr

lcnr commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

and we should add comments to all associated items of Interner which should be different between rustc and r-a so that we don't try to uplift them in the future. Remembering comments on github threads is not ideal xd

@Jamesbarford
Jamesbarford force-pushed the chore/move-late-param-region branch from 3103e42 to 3d2dad1 Compare August 13, 2026 08:43
Comment thread compiler/rustc_type_ir/src/sty/mod.rs Outdated
Comment thread compiler/rustc_type_ir/src/interner.rs

@lcnr lcnr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jamesbarford
Jamesbarford force-pushed the chore/move-late-param-region branch from 3d2dad1 to 0919d8e Compare August 13, 2026 09:14
@Jamesbarford

Copy link
Copy Markdown
Contributor Author

@bors r=lcnr

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@Jamesbarford: 🔑 Insufficient privileges: not in review users

@lcnr

lcnr commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0919d8e has been approved by lcnr

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 13, 2026
@rust-log-analyzer

This comment has been minimized.

@lqd

lqd commented Aug 13, 2026

Copy link
Copy Markdown
Member

The warnings will need to be fixed

@bors r-

@lcnr

lcnr commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@bors delegate+ unless it's more involved to fix CI

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 13, 2026
@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 13, 2026
@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Unknown argument "unless". Did you mean to use @bors tryorreview``? Run @bors help or go to https://bors.rust-lang.org/help to see available commands.

@lqd

lqd commented Aug 13, 2026

Copy link
Copy Markdown
Member

@bors delegate+

but r lcnr instead of me ofc despite what the bot will say

@rust-bors

rust-bors Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

✌️ @Jamesbarford, you can now approve this pull request!

If @lqd told you to "r=me" after making some further change, then please make that change and post @bors r=lqd.

View changes since this delegation.

@Jamesbarford
Jamesbarford force-pushed the chore/move-late-param-region branch from 0919d8e to a80c8e5 Compare August 14, 2026 08:10
@rust-log-analyzer

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

7 participants