@@ -6,9 +6,7 @@ use rustc_infer::infer::{InferCtxt, TyCtxtInferExt};
6
6
use rustc_infer:: traits:: TraitEngineExt as _;
7
7
use rustc_middle:: ty:: query:: Providers ;
8
8
use rustc_middle:: ty:: subst:: { GenericArg , Subst , UserSelfTy , UserSubsts } ;
9
- use rustc_middle:: ty:: {
10
- self , FnSig , Lift , PolyFnSig , PredicateKind , Ty , TyCtxt , TypeFoldable , Variance ,
11
- } ;
9
+ use rustc_middle:: ty:: { self , FnSig , Lift , PolyFnSig , Ty , TyCtxt , TypeFoldable , Variance } ;
12
10
use rustc_middle:: ty:: { ParamEnv , ParamEnvAnd , Predicate , ToPredicate } ;
13
11
use rustc_span:: DUMMY_SP ;
14
12
use rustc_trait_selection:: infer:: InferCtxtBuilderExt ;
@@ -87,16 +85,7 @@ impl AscribeUserTypeCx<'me, 'tcx> {
87
85
Ok ( ( ) )
88
86
}
89
87
90
- fn prove_predicate ( & mut self , mut predicate : Predicate < ' tcx > ) {
91
- if let PredicateKind :: Trait ( mut tr) = predicate. kind ( ) . skip_binder ( ) {
92
- if let hir:: Constness :: Const = tr. constness {
93
- // FIXME check if we actually want to prove const predicates inside AscribeUserType
94
- tr. constness = hir:: Constness :: NotConst ;
95
- predicate =
96
- predicate. kind ( ) . rebind ( PredicateKind :: Trait ( tr) ) . to_predicate ( self . tcx ( ) ) ;
97
- }
98
- }
99
-
88
+ fn prove_predicate ( & mut self , predicate : Predicate < ' tcx > ) {
100
89
self . fulfill_cx . register_predicate_obligation (
101
90
self . infcx ,
102
91
Obligation :: new ( ObligationCause :: dummy ( ) , self . param_env , predicate) ,
0 commit comments