diff options
| author | Miguel Guarniz <mi9uel9@gmail.com> | 2022-05-07 15:27:50 -0400 |
|---|---|---|
| committer | Miguel Guarniz <mi9uel9@gmail.com> | 2022-05-13 11:46:06 -0400 |
| commit | 0b7dd95475d0150719cd859dbd6e2fe7092d83bd (patch) | |
| tree | c697139eabb622d9a384ff631485b3c30dd09dc0 /compiler | |
| parent | 885b90bb349d0e37e0fe26cdb7afadbc1e8c57f0 (diff) | |
| download | rust-0b7dd95475d0150719cd859dbd6e2fe7092d83bd.tar.gz rust-0b7dd95475d0150719cd859dbd6e2fe7092d83bd.zip | |
remove HirVisitor
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_passes/src/debugger_visualizer.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/rustc_passes/src/debugger_visualizer.rs b/compiler/rustc_passes/src/debugger_visualizer.rs index e8a508da52d..dc63a2d8666 100644 --- a/compiler/rustc_passes/src/debugger_visualizer.rs +++ b/compiler/rustc_passes/src/debugger_visualizer.rs @@ -16,7 +16,7 @@ use std::sync::Arc; fn check_for_debugger_visualizer<'tcx>( tcx: TyCtxt<'tcx>, hir_id: HirId, - debugger_visualizers: &mut FxHashSet<DebuggerVisualizerFile> + debugger_visualizers: &mut FxHashSet<DebuggerVisualizerFile>, ) { let attrs = tcx.hir().attrs(hir_id); for attr in attrs { @@ -51,8 +51,7 @@ fn check_for_debugger_visualizer<'tcx>( let contents = match std::fs::read(&file) { Ok(contents) => contents, Err(err) => { - tcx - .sess + tcx.sess .struct_span_err( attr.span, &format!( @@ -71,12 +70,8 @@ fn check_for_debugger_visualizer<'tcx>( DebuggerVisualizerType::Natvis, )); } else { - tcx - .sess - .struct_span_err( - attr.span, - &format!("{} is not a valid file", file.display()), - ) + tcx.sess + .struct_span_err(attr.span, &format!("{} is not a valid file", file.display())) .emit(); } } @@ -101,7 +96,6 @@ fn debugger_visualizers<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Vec<Debugger // Collect debugger visualizers on the crate attributes. check_for_debugger_visualizer(tcx, CRATE_HIR_ID, &mut debugger_visualizers); - // Extract out the found debugger_visualizer items. let mut visualizers = debugger_visualizers.into_iter().collect::<Vec<_>>(); |
