Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not print type for placeholder values
  • Loading branch information
varkor committed Oct 21, 2020
1 parent 6b52603 commit 37c00c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_symbol_mangling/src/v0.rs
Expand Up @@ -548,9 +548,10 @@ impl Printer<'tcx> for SymbolMangler<'tcx> {
bug!("symbol_names: unsupported constant of type `{}` ({:?})", ct.ty, ct);
}
};
self = ct.ty.print(self)?;

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

0 comments on commit 37c00c4

Please sign in to comment.