use crate::dep_graph::{DepKind, DepNode, RecoverKey, SerializedDepNodeIndex};
use crate::mir;
-use crate::mir::interpret::GlobalId;
+use crate::mir::interpret::{GlobalId, LitToConstInput};
use crate::traits;
use crate::traits::query::{
CanonicalPredicateGoal, CanonicalProjectionGoal, CanonicalTyGoal,
desc { "looking up the native libraries of a linked crate" }
}
- query lint_levels(_: CrateNum) -> &'tcx lint::LintLevelMap {
+ query lint_levels(_: CrateNum) -> &'tcx LintLevelMap {
eval_always
desc { "computing the lint levels for items in this crate" }
}
desc { "extract field of const" }
}
+ /// Destructure a constant ADT or array into its variant indent and its
+ /// field values.
+ query destructure_const(
+ key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>
+ ) -> mir::DestructuredConst<'tcx> {
+ no_force
+ desc { "destructure constant" }
+ }
+
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> &'tcx ty::Const<'tcx> {
no_force
desc { "get a &core::panic::Location referring to a span" }
}
+
+ query lit_to_const(
+ key: LitToConstInput<'tcx>
+ ) -> Result<&'tcx ty::Const<'tcx>, LitToConstError> {
+ no_force
+ desc { "converting literal to const" }
+ }
}
TypeChecking {
desc { "normalizing `{:?}`", goal }
}
- query substitute_normalize_and_test_predicates(key: (DefId, SubstsRef<'tcx>)) -> bool {
+ query substitute_normalize_and_test_predicates(key: (DefId, SubstsRef<'tcx>, traits::TraitQueryMode)) -> bool {
no_force
desc { |tcx|
- "testing substituted normalized predicates:`{}`",
- tcx.def_path_str(key.0)
+ "testing substituted normalized predicates in mode {:?}:`{}`",
+ key.2, tcx.def_path_str(key.0)
}
}