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