Skip to content

Commit 37c00c4

Browse files
committed
Do not print type for placeholder values
1 parent 6b52603 commit 37c00c4

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_symbol_mangling/src

1 file changed

+2
-1
lines changed

compiler/rustc_symbol_mangling/src/v0.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,10 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
548548
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
549549
}
550550
};
551-
self = ct.ty.print(self)?;
552551

553552
if let Some(bits) = val {
553+
// We only print the type if the const can be evaluated.
554+
self = ct.ty.print(self)?;
554555
let _ = write!(self.out, "{}{:x}_", if neg { "n" } else { "" }, bits);
555556
} else {
556557
// NOTE(eddyb) despite having the path, we need to

0 commit comments

Comments
 (0)