diff options
| author | bors <bors@rust-lang.org> | 2024-06-04 14:49:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-04 14:49:54 +0000 |
| commit | 30ea1a2693bb1ba4b119ac6257985b9e11e45b83 (patch) | |
| tree | 6ef3551ed54771be991beeae7b9e8f43a09fd41c /compiler/rustc_driver_impl/src | |
| parent | bc33782c23bc3e04eab7c85c43bbe1a108b11f80 (diff) | |
| parent | a5dc684eee684c23032f8f8beba1ff90322a61f8 (diff) | |
| download | rust-30ea1a2693bb1ba4b119ac6257985b9e11e45b83.tar.gz rust-30ea1a2693bb1ba4b119ac6257985b9e11e45b83.zip | |
Auto merge of #125976 - compiler-errors:rollup-xt3le7w, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #125667 (Silence follow-up errors directly based on error types and regions) - #125717 (Refactor `#[diagnostic::do_not_recommend]` support) - #125795 (Improve renaming suggestion for names with leading underscores) - #125865 (Fix ICE caused by ignoring EffectVars in type inference) - #125953 (Streamline `nested` calls.) - #125959 (Reduce `pub` exposure in `rustc_mir_build`) - #125967 (Split smir `Const` into `TyConst` and `MirConst`) - #125968 (Store the types of `ty::Expr` arguments in the `ty::Expr`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/pretty.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs index 8acba57b7a6..31de0a747b2 100644 --- a/compiler/rustc_driver_impl/src/pretty.rs +++ b/compiler/rustc_driver_impl/src/pretty.rs @@ -3,7 +3,6 @@ use rustc_ast as ast; use rustc_ast_pretty::pprust as pprust_ast; use rustc_errors::FatalError; -use rustc_hir as hir; use rustc_hir_pretty as pprust_hir; use rustc_middle::bug; use rustc_middle::mir::{write_mir_graphviz, write_mir_pretty}; @@ -70,11 +69,7 @@ struct HirIdentifiedAnn<'tcx> { impl<'tcx> pprust_hir::PpAnn for HirIdentifiedAnn<'tcx> { fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) { - pprust_hir::PpAnn::nested( - &(&self.tcx.hir() as &dyn hir::intravisit::Map<'_>), - state, - nested, - ) + self.tcx.nested(state, nested) } fn pre(&self, s: &mut pprust_hir::State<'_>, node: pprust_hir::AnnNode<'_>) { @@ -152,8 +147,7 @@ impl<'tcx> pprust_hir::PpAnn for HirTypedAnn<'tcx> { if let pprust_hir::Nested::Body(id) = nested { self.maybe_typeck_results.set(Some(self.tcx.typeck_body(id))); } - let pp_ann = &(&self.tcx.hir() as &dyn hir::intravisit::Map<'_>); - pprust_hir::PpAnn::nested(pp_ann, state, nested); + self.tcx.nested(state, nested); self.maybe_typeck_results.set(old_maybe_typeck_results); } |
