@@ -38,7 +38,10 @@ use crate::traits::query::{
38
38
OutlivesBound ,
39
39
} ;
40
40
use crate :: traits:: specialization_graph;
41
- use crate :: traits:: { self , ImplSource } ;
41
+ use crate :: traits:: {
42
+ CanonicalChalkEnvironmentAndGoal , CodegenObligationError , EvaluationResult , ImplSource ,
43
+ ObjectSafetyViolation , ObligationCause , OverflowError , WellFormedLoc ,
44
+ } ;
42
45
use crate :: ty:: fast_reject:: SimplifiedType ;
43
46
use crate :: ty:: layout:: ValidityRequirement ;
44
47
use crate :: ty:: subst:: { GenericArg , SubstsRef } ;
@@ -1273,7 +1276,7 @@ rustc_queries! {
1273
1276
1274
1277
query codegen_select_candidate(
1275
1278
key: ( ty:: ParamEnv <' tcx>, ty:: PolyTraitRef <' tcx>)
1276
- ) -> Result <& ' tcx ImplSource <' tcx, ( ) >, traits :: CodegenObligationError > {
1279
+ ) -> Result <& ' tcx ImplSource <' tcx, ( ) >, CodegenObligationError > {
1277
1280
cache_on_disk_if { true }
1278
1281
desc { |tcx| "computing candidate for `{}`" , key. 1 }
1279
1282
}
@@ -1294,7 +1297,7 @@ rustc_queries! {
1294
1297
desc { |tcx| "building specialization graph of trait `{}`" , tcx. def_path_str( trait_id) }
1295
1298
cache_on_disk_if { true }
1296
1299
}
1297
- query object_safety_violations( trait_id: DefId ) -> & ' tcx [ traits :: ObjectSafetyViolation ] {
1300
+ query object_safety_violations( trait_id: DefId ) -> & ' tcx [ ObjectSafetyViolation ] {
1298
1301
desc { |tcx| "determining object safety of trait `{}`" , tcx. def_path_str( trait_id) }
1299
1302
}
1300
1303
query check_is_object_safe( trait_id: DefId ) -> bool {
@@ -1838,8 +1841,7 @@ rustc_queries! {
1838
1841
}
1839
1842
1840
1843
/// A list of all traits in a crate, used by rustdoc and error reporting.
1841
- /// NOTE: Not named just `traits` due to a naming conflict.
1842
- query traits_in_crate( _: CrateNum ) -> & ' tcx [ DefId ] {
1844
+ query traits( _: CrateNum ) -> & ' tcx [ DefId ] {
1843
1845
desc { "fetching all traits in a crate" }
1844
1846
separate_provide_extern
1845
1847
}
@@ -1953,12 +1955,12 @@ rustc_queries! {
1953
1955
/// `infcx.predicate_must_hold()` instead.
1954
1956
query evaluate_obligation(
1955
1957
goal: CanonicalPredicateGoal <' tcx>
1956
- ) -> Result <traits :: EvaluationResult , traits :: OverflowError > {
1958
+ ) -> Result <EvaluationResult , OverflowError > {
1957
1959
desc { "evaluating trait selection obligation `{}`" , goal. value. value }
1958
1960
}
1959
1961
1960
1962
query evaluate_goal(
1961
- goal: traits :: CanonicalChalkEnvironmentAndGoal <' tcx>
1963
+ goal: CanonicalChalkEnvironmentAndGoal <' tcx>
1962
1964
) -> Result <
1963
1965
& ' tcx Canonical <' tcx, canonical:: QueryResponse <' tcx, ( ) >>,
1964
1966
NoSolution
@@ -2128,8 +2130,8 @@ rustc_queries! {
2128
2130
/// all of the cases that the normal `ty::Ty`-based wfcheck does. This is fine,
2129
2131
/// because the `ty::Ty`-based wfcheck is always run.
2130
2132
query diagnostic_hir_wf_check(
2131
- key: ( ty:: Predicate <' tcx>, traits :: WellFormedLoc )
2132
- ) -> & ' tcx Option <traits :: ObligationCause <' tcx>> {
2133
+ key: ( ty:: Predicate <' tcx>, WellFormedLoc )
2134
+ ) -> & ' tcx Option <ObligationCause <' tcx>> {
2133
2135
arena_cache
2134
2136
eval_always
2135
2137
no_hash
0 commit comments