Fix an ICE in CGU dumping code.

This commit is contained in:
Nicholas Nethercote 2023-05-18 14:45:52 +10:00
parent d3f416dc06
commit 1551495d32

View File

@ -365,14 +365,14 @@ fn debug_dump<'a, 'tcx, I>(tcx: TyCtxt<'tcx>, label: &str, cgus: I)
let symbol_hash_start = symbol_name.rfind('h');
let symbol_hash = symbol_hash_start.map_or("<no hash>", |i| &symbol_name[i..]);
let _ = writeln!(
let _ = with_no_trimmed_paths!(writeln!(
s,
" - {} [{:?}] [{}] estimated size {}",
mono_item,
linkage,
symbol_hash,
mono_item.size_estimate(tcx)
);
));
}
let _ = writeln!(s);