Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9b855a9

Browse files
committed
Add missing with_no_trimmed_paths to CommentWriter::new()
1 parent baee5ce commit 9b855a9

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/pretty_clif.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ use cranelift_codegen::{
6464
write::{FuncWriter, PlainWriter},
6565
};
6666
use rustc_middle::ty::layout::FnAbiOf;
67+
use rustc_middle::ty::print::with_no_trimmed_paths;
6768
use rustc_session::config::{OutputFilenames, OutputType};
6869

6970
use crate::prelude::*;
@@ -79,15 +80,17 @@ impl CommentWriter {
7980
pub(crate) fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
8081
let enabled = should_write_ir(tcx);
8182
let global_comments = if enabled {
82-
vec![
83-
format!("symbol {}", tcx.symbol_name(instance).name),
84-
format!("instance {:?}", instance),
85-
format!(
86-
"abi {:?}",
87-
RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty())
88-
),
89-
String::new(),
90-
]
83+
with_no_trimmed_paths!({
84+
vec![
85+
format!("symbol {}", tcx.symbol_name(instance).name),
86+
format!("instance {:?}", instance),
87+
format!(
88+
"abi {:?}",
89+
RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty())
90+
),
91+
String::new(),
92+
]
93+
})
9194
} else {
9295
vec![]
9396
};

0 commit comments

Comments
 (0)