Remove rustc_middle dependency on rustc_hir_pretty - #160360
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| impl<'tcx, B: Bridge> rustc_hir_pretty::PpAnn for CompilerCtxt<'tcx, B> { | ||
| fn nested(&self, state: &mut rustc_hir_pretty::State<'_>, nested: rustc_hir_pretty::Nested) { | ||
| rustc_hir_pretty::PpAnn::nested( | ||
| &(&self.tcx as &dyn rustc_hir::intravisit::HirTyCtxt<'_>), | ||
| state, | ||
| nested, | ||
| ) | ||
| } | ||
| } | ||
|
|
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove rustc_middle dependency on rustc_hir_pretty
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors try cancel |
|
Try build cancelled. Cancelled workflows: |
There is a `impl PpAnn for TyCtxt` that is unneeded. None of the big crates (middle, trait_selection) actually do any hir pretty printing so it can be removed and can either be implemented for local structs elsewhere or done by casting to `&dyn PpAnn` instead.
|
cc @rust-lang/clippy |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Remove rustc_middle dependency on rustc_hir_pretty
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (0f4b3c5): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.5%, secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.0%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.553s -> 490.894s (0.07%) |
There is a
impl PpAnn for TyCtxtthat is unneeded. None of the big crates (middle, trait_selection) actually do any hir pretty printing so it can be removed and can either be implemented for local structs elsewhere or done by casting to&dyn PpAnninstead.This probably doesn't have any perf effects (its not bottlenecking in timings) but I expect it to compose with #160336 and its followup works quite well.
Old graph:

New graph:
