Rollup merge of #136176 - oli-obk:pattern-type-mir-opts, r=compiler-errors
Render pattern types nicely in mir dumps avoid falling through to the fallback rendering that just does a hex dump r? ``@scottmcm`` best reviewed commit by commit
This commit is contained in:
commit
f49ad60fee
3 changed files with 31 additions and 0 deletions
|
@ -1740,6 +1740,10 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
|
|||
" as ",
|
||||
)?;
|
||||
}
|
||||
ty::Pat(base_ty, pat) => {
|
||||
self.pretty_print_const_scalar_int(int, *base_ty, print_ty)?;
|
||||
p!(write(" is {pat:?}"));
|
||||
}
|
||||
// Nontrivial types with scalar bit representation
|
||||
_ => {
|
||||
let print = |this: &mut Self| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue