Name the destructure_mir_constant query appropriately
This commit is contained in:
parent
46cce98134
commit
8ac1a67d11
4 changed files with 6 additions and 6 deletions
|
@ -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("[")?;
|
||||
|
|
|
@ -1088,7 +1088,7 @@ rustc_queries! {
|
|||
|
||||
/// Tries to destructure an `mir::ConstantKind` ADT or array into its variant index
|
||||
/// and its field values. This should only be used for pretty printing.
|
||||
query try_destructure_mir_constant(
|
||||
query try_destructure_mir_constant_for_diagnostics(
|
||||
key: (ConstValue<'tcx>, Ty<'tcx>)
|
||||
) -> Option<mir::DestructuredConstant<'tcx>> {
|
||||
desc { "destructuring MIR constant"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue