Add missing with_no_trimmed_paths to CommentWriter::new()

This commit is contained in:
bjorn3 2023-09-19 12:44:31 +00:00
parent baee5ce1fc
commit 9b855a9f61

View File

@ -64,6 +64,7 @@ use cranelift_codegen::{
write::{FuncWriter, PlainWriter},
};
use rustc_middle::ty::layout::FnAbiOf;
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_session::config::{OutputFilenames, OutputType};
use crate::prelude::*;
@ -79,6 +80,7 @@ impl CommentWriter {
pub(crate) fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
let enabled = should_write_ir(tcx);
let global_comments = if enabled {
with_no_trimmed_paths!({
vec![
format!("symbol {}", tcx.symbol_name(instance).name),
format!("instance {:?}", instance),
@ -88,6 +90,7 @@ impl CommentWriter {
),
String::new(),
]
})
} else {
vec![]
};