X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fquery%2Fmod.rs;h=a20e011b91a7543697bdb006784a82e205397ace;hb=c411c22eb00580f4bea32eabc7f4458d4ee4a598;hp=50ef115da2c4219e4e76d8c8bc20441cce3d44b5;hpb=076d6a0c9a6dd53358dbd56ca1aa662325c2df6b;p=rust.git diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs index 50ef115da2c..a20e011b91a 100644 --- a/src/librustc/query/mod.rs +++ b/src/librustc/query/mod.rs @@ -1,6 +1,6 @@ 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, @@ -518,6 +518,13 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String { 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 { @@ -1141,11 +1148,11 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String { 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) } }