diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-09-19 12:44:31 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-09-19 12:44:31 +0000 |
| commit | 9b855a9f614be98c0e54da4d9ea0f10ffa288618 (patch) | |
| tree | bf6e3cdb1d261282b9d4b0259cdc51d4902c6d25 | |
| parent | baee5ce1fcedc57063e10ead5b4fdb42c3f74c93 (diff) | |
| download | rust-9b855a9f614be98c0e54da4d9ea0f10ffa288618.tar.gz rust-9b855a9f614be98c0e54da4d9ea0f10ffa288618.zip | |
Add missing with_no_trimmed_paths to CommentWriter::new()
| -rw-r--r-- | src/pretty_clif.rs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/pretty_clif.rs b/src/pretty_clif.rs index 9919ebd6706..da84e54a916 100644 --- a/src/pretty_clif.rs +++ b/src/pretty_clif.rs @@ -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![] }; |
