From 52830efdcc216a78319fabeb26259570614686ca Mon Sep 17 00:00:00 2001 From: b-naber Date: Tue, 9 Aug 2022 19:12:14 +0200 Subject: [PATCH] fix --- compiler/rustc_middle/src/ty/print/pretty.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 7f2e81a71a9..cc55b7e8611 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -1513,6 +1513,10 @@ fn pretty_print_const_valtree( } 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); }