Skip to content

Move LateParamRegion to rustc_type_ir - #160986

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

Move LateParamRegion to rustc_type_ir#160986
Jamesbarford wants to merge 1 commit 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

Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: warnings are denied by `build.warnings` configuration
warning: build failed, waiting for other jobs to finish...
Bootstrap failed while executing `doc compiler --stage 1`
Currently active steps:
doc::Rustc { build_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu, forced_compiler: false }, target: x86_64-unknown-linux-gnu, crates: ["rustc-main", "rustc_abi", "rustc_arena", "rustc_ast", "rustc_ast_ir", "rustc_ast_lowering", "rustc_ast_passes", "rustc_ast_pretty", "rustc_attr_ir", "rustc_attr_parsing", "rustc_baked_icu_data", "rustc_borrowck", "rustc_builtin_macros", "rustc_codegen_llvm", "rustc_codegen_ssa", "rustc_const_eval", "rustc_crate_store", "rustc_data_structures", "rustc_driver", "rustc_driver_impl", "rustc_error_codes", "rustc_error_messages", "rustc_errors", "rustc_expand", "rustc_feature", "rustc_fs_util", "rustc_graphviz", "rustc_hashes", "rustc_hir", "rustc_hir_analysis", "rustc_hir_id", "rustc_hir_pretty", "rustc_hir_typeck", "rustc_incremental", "rustc_index", "rustc_index_macros", "rustc_infer", "rustc_interface", "rustc_lexer", "rustc_lint", "rustc_lint_defs", "rustc_llvm", "rustc_log", "rustc_macros", "rustc_metadata", "rustc_middle", "rustc_mir_build", "rustc_mir_dataflow", "rustc_mir_transform", "rustc_monomorphize", "rustc_next_trait_solver", "rustc_parse", "rustc_parse_format", "rustc_passes", "rustc_pattern_analysis", "rustc_privacy", "rustc_proc_macro", "rustc_public", "rustc_public_bridge", "rustc_query_impl", "rustc_resolve", "rustc_sanitizers", "rustc_serialize", "rustc_session", "rustc_span", "rustc_symbol_mangling", "rustc_target", "rustc_thread_pool", "rustc_trait_selection", "rustc_traits", "rustc_transmute", "rustc_ty_utils", "rustc_ty_walk", "rustc_type_ir", "rustc_type_ir_macros", "rustc_windows_rc"] } at src/bootstrap/src/core/build_steps/doc.rs:915
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo doc --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color=always --profile=release --features 'llvm rustc' --manifest-path /checkout/compiler/rustc/Cargo.toml -Zskip-rustdoc-fingerprint --no-deps -Zrustdoc-map -p rustc-main -p rustc_abi -p rustc_arena -p rustc_ast -p rustc_ast_ir -p rustc_ast_lowering -p rustc_ast_passes -p rustc_ast_pretty -p rustc_attr_ir -p rustc_attr_parsing -p rustc_baked_icu_data -p rustc_borrowck -p rustc_builtin_macros -p rustc_codegen_llvm -p rustc_codegen_ssa -p rustc_const_eval -p rustc_crate_store -p rustc_data_structures -p rustc_driver -p rustc_driver_impl -p rustc_error_codes -p rustc_error_messages -p rustc_errors -p rustc_expand -p rustc_feature -p rustc_fs_util -p rustc_graphviz -p rustc_hashes -p rustc_hir -p rustc_hir_analysis -p rustc_hir_id -p rustc_hir_pretty -p rustc_hir_typeck -p rustc_incremental -p rustc_index -p rustc_index_macros -p rustc_infer -p rustc_interface -p rustc_lexer -p rustc_lint -p rustc_lint_defs -p rustc_llvm -p rustc_log -p rustc_macros -p rustc_metadata -p rustc_middle -p rustc_mir_build -p rustc_mir_dataflow -p rustc_mir_transform -p rustc_monomorphize -p rustc_next_trait_solver -p rustc_parse -p rustc_parse_format -p rustc_passes -p rustc_pattern_analysis -p rustc_privacy -p rustc_proc_macro -p rustc_public -p rustc_public_bridge -p rustc_query_impl -p rustc_resolve -p rustc_sanitizers -p rustc_serialize -p rustc_session -p rustc_span -p rustc_symbol_mangling -p rustc_target -p rustc_thread_pool -p rustc_trait_selection -p rustc_traits -p rustc_transmute -p rustc_ty_utils -p rustc_ty_walk -p rustc_type_ir -p rustc_type_ir_macros -p rustc_windows_rc [workdir=/checkout]` failed with exit code 101
Created at: src/bootstrap/src/core/build_steps/doc.rs:945:25
Executed at: src/bootstrap/src/core/build_steps/doc.rs:1006:26

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:03:35
  local time: Thu Aug 13 10:04:07 UTC 2026
  network time: Thu, 13 Aug 2026 10:04:07 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@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.

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