Create some minimal HIR for associated opaque types#120943
Create some minimal HIR for associated opaque types#120943bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use r? to explicitly pick a reviewer |
|
@cjgillot @compiler-errors What do you think? |
|
I can take a look at this later. My first reaction (having only vaguely skimmed the code) is that this makes sense, and I wonder if we can actually add more information into this feeded HIR to get rid of some r? compiler-errors |
oli-obk
left a comment
There was a problem hiding this comment.
Makes sense. I think we'll be able to use the same scheme for other, similar situations where we want to create def ids and feed queries
This comment was marked as resolved.
This comment was marked as resolved.
|
@rustbot ready |
|
@bors r+ |
Create some minimal HIR for associated opaque types `LocalDefId`s for opaque types in traits and impls are created after AST -> HIR lowering, so they don't have corresponding HIR and return their various properties through fed queries. In this PR I also feed some core HIR-related queries for these `LocalDefId`s (which happen to be HIR owners). As a result all `LocalDefId`s now have corresponding `HirId`s and HIR nodes, and "optional" methods like `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` can be removed. Follow up to rust-lang#120206.
Create some minimal HIR for associated opaque types `LocalDefId`s for opaque types in traits and impls are created after AST -> HIR lowering, so they don't have corresponding HIR and return their various properties through fed queries. In this PR I also feed some core HIR-related queries for these `LocalDefId`s (which happen to be HIR owners). As a result all `LocalDefId`s now have corresponding `HirId`s and HIR nodes, and "optional" methods like `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` can be removed. Follow up to rust-lang#120206.
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104353 (Add CStr::bytes iterator) - rust-lang#120699 (Document `TRACK_DIAGNOSTIC` calls.) - rust-lang#120943 (Create some minimal HIR for associated opaque types) - rust-lang#121764 (Make incremental sessions identity no longer depend on the crate names provided by source code) - rust-lang#122375 (CFI: Break tests into smaller files) - rust-lang#122397 (Various cleanups around the const eval query providers) - rust-lang#122405 (Add methods to create StableMIR constant) - rust-lang#122416 (Various style improvements to `rustc_lint::levels`) - rust-lang#122440 (const-eval: organize and extend tests for required-consts) r? `@ghost` `@rustbot` modify labels: rollup
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (fe61575): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 670.541s -> 669.602s (-0.14%) |
hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` Also replace a few `hir_node()` calls with `hir_node_by_def_id()`. Follow up to rust-lang#120943.
Rollup merge of rust-lang#122513 - petrochenkov:somehir4, r=fmease hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` Also replace a few `hir_node()` calls with `hir_node_by_def_id()`. Follow up to rust-lang#120943.
hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` Also replace a few `hir_node()` calls with `hir_node_by_def_id()`. Follow up to rust-lang/rust#120943.
LocalDefIds for opaque types in traits and impls are created after AST -> HIR lowering, so they don't have corresponding HIR and return their various properties through fed queries.In this PR I also feed some core HIR-related queries for these
LocalDefIds (which happen to be HIR owners).As a result all
LocalDefIds now have correspondingHirIds and HIR nodes, and "optional" methods likeopt_local_def_id_to_hir_idandopt_hir_node_by_def_idcan be removed.Follow up to #120206.