diff options
| author | bors <bors@rust-lang.org> | 2024-04-16 00:03:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-16 00:03:54 +0000 |
| commit | 63f70b3d104e20289a1a0df82747066c3d85b9a1 (patch) | |
| tree | 0b40f90b72cd147fb599533fad3cbc59fae6443f /compiler/rustc_driver_impl/src | |
| parent | ccfcd950b333fed046275dd8d54fe736ca498aa7 (diff) | |
| parent | daa2ebc70cdca3c4c03ca7caf8b678d7854b5453 (diff) | |
| download | rust-63f70b3d104e20289a1a0df82747066c3d85b9a1.tar.gz rust-63f70b3d104e20289a1a0df82747066c3d85b9a1.zip | |
Auto merge of #123991 - fmease:rollup-96xcgnm, r=fmease
Rollup of 7 pull requests Successful merges: - #123016 (Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`) - #123462 (Cleanup: Rename `ModSep` to `PathSep`) - #123603 (Don't even parse an intrinsic unless the feature gate is enabled) - #123926 (Fix pretty HIR for anon consts in diagnostics) - #123973 (crashes: readme: add reminder to add Fixes #abcde to prs to automatically close issues.) - #123984 (sanitizers: Add rustc_sanitizers to triagebot.toml) - #123989 (Just use `type_dependent_def_id` to figure out what the method is for an 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 | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs index c0c6201f73d..40f6f764993 100644 --- a/compiler/rustc_driver_impl/src/pretty.rs +++ b/compiler/rustc_driver_impl/src/pretty.rs @@ -24,20 +24,6 @@ struct AstNoAnn; impl pprust_ast::PpAnn for AstNoAnn {} -struct HirNoAnn<'tcx> { - tcx: TyCtxt<'tcx>, -} - -impl<'tcx> pprust_hir::PpAnn for HirNoAnn<'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, - ) - } -} - struct AstIdentifiedAnn; impl pprust_ast::PpAnn for AstIdentifiedAnn { @@ -300,10 +286,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) { ) }; match s { - PpHirMode::Normal => { - let annotation = HirNoAnn { tcx }; - f(&annotation) - } + PpHirMode::Normal => f(&tcx), PpHirMode::Identified => { let annotation = HirIdentifiedAnn { tcx }; f(&annotation) |
