We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b52603 commit 37c00c4Copy full SHA for 37c00c4
compiler/rustc_symbol_mangling/src/v0.rs
@@ -548,9 +548,10 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
548
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
549
}
550
};
551
- self = ct.ty.print(self)?;
552
553
if let Some(bits) = val {
+ // We only print the type if the const can be evaluated.
554
+ self = ct.ty.print(self)?;
555
let _ = write!(self.out, "{}{:x}_", if neg { "n" } else { "" }, bits);
556
} else {
557
// NOTE(eddyb) despite having the path, we need to
0 commit comments