1
Fork 0

Specialize try_destructure_mir_constant for its sole user

This commit is contained in:
Oli Scherer 2023-06-28 09:23:34 +00:00
parent dfe0683138
commit 4dcf988360
6 changed files with 23 additions and 18 deletions

View file

@ -1087,11 +1087,13 @@ rustc_queries! {
}
/// Tries to destructure an `mir::ConstantKind` ADT or array into its variant index
/// and its field values.
/// and its field values. This should only be used for pretty printing.
query try_destructure_mir_constant(
key: ty::ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>>
key: (ConstValue<'tcx>, Ty<'tcx>)
) -> Option<mir::DestructuredConstant<'tcx>> {
desc { "destructuring MIR constant"}
no_hash
eval_always
}
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> {