Rollup merge of #100359 - b-naber:valtrees-pretty-print-ice, r=lcnr
Special-case references to leafs in valtree pretty-printing Fixes https://github.com/rust-lang/rust/issues/100313
This commit is contained in:
commit
96fc9f177e
3 changed files with 40 additions and 0 deletions
|
@ -1513,6 +1513,10 @@ pub trait PrettyPrinter<'tcx>:
|
|||
}
|
||||
return Ok(self);
|
||||
}
|
||||
(ty::ValTree::Leaf(leaf), ty::Ref(_, inner_ty, _)) => {
|
||||
p!(write("&"));
|
||||
return self.pretty_print_const_scalar_int(leaf, *inner_ty, print_ty);
|
||||
}
|
||||
(ty::ValTree::Leaf(leaf), _) => {
|
||||
return self.pretty_print_const_scalar_int(leaf, ty, print_ty);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue