Add missing with_no_trimmed_paths to CommentWriter::new()
This commit is contained in:
parent
baee5ce1fc
commit
9b855a9f61
@ -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,15 +80,17 @@ 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 {
|
||||
vec![
|
||||
format!("symbol {}", tcx.symbol_name(instance).name),
|
||||
format!("instance {:?}", instance),
|
||||
format!(
|
||||
"abi {:?}",
|
||||
RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty())
|
||||
),
|
||||
String::new(),
|
||||
]
|
||||
with_no_trimmed_paths!({
|
||||
vec![
|
||||
format!("symbol {}", tcx.symbol_name(instance).name),
|
||||
format!("instance {:?}", instance),
|
||||
format!(
|
||||
"abi {:?}",
|
||||
RevealAllLayoutCx(tcx).fn_abi_of_instance(instance, ty::List::empty())
|
||||
),
|
||||
String::new(),
|
||||
]
|
||||
})
|
||||
} else {
|
||||
vec![]
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user