1
Fork 0

Fix inconsistent symbol mangling with -Zverbose

Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with `-Zverbose` flag and without it.
This commit is contained in:
Tomasz Miąsko 2022-02-16 00:00:00 +00:00
parent bfb2856f27
commit 3158372dea
6 changed files with 23 additions and 13 deletions

View file

@ -188,11 +188,6 @@ pub trait Printer<'tcx>: Sized {
own_params.start = 1;
}
// If we're in verbose mode, then print default-equal args too
if self.tcx().sess.verbose() {
return &substs[own_params];
}
// Don't print args that are the defaults of their respective parameters.
own_params.end -= generics
.params