Name the destructure_mir_constant query appropriately

This commit is contained in:
Oli Scherer
2023-07-05 15:51:52 +00:00
parent 46cce98134
commit 8ac1a67d11
4 changed files with 6 additions and 6 deletions

View File

@@ -2887,8 +2887,8 @@ fn pretty_print_const_value<'tcx>(
(_, ty::Array(..) | ty::Tuple(..) | ty::Adt(..)) if !ty.has_non_region_param() => {
let ct = tcx.lift(ct).unwrap();
let ty = tcx.lift(ty).unwrap();
if let Some(contents) = tcx.try_destructure_mir_constant((ct, ty)) {
let fields = contents.fields.to_vec();
if let Some(contents) = tcx.try_destructure_mir_constant_for_diagnostics((ct, ty)) {
let fields: Vec<(ConstValue<'_>, Ty<'_>)> = contents.fields.to_vec();
match *ty.kind() {
ty::Array(..) => {
fmt.write_str("[")?;