@@ -6,9 +6,7 @@ use rustc_infer::infer::{InferCtxt, TyCtxtInferExt};
66use rustc_infer:: traits:: TraitEngineExt as _;
77use rustc_middle:: ty:: query:: Providers ;
88use 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 } ;
1210use rustc_middle:: ty:: { ParamEnv , ParamEnvAnd , Predicate , ToPredicate } ;
1311use rustc_span:: DUMMY_SP ;
1412use rustc_trait_selection:: infer:: InferCtxtBuilderExt ;
@@ -87,16 +85,7 @@ impl AscribeUserTypeCx<'me, 'tcx> {
8785 Ok ( ( ) )
8886 }
8987
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 > ) {
10089 self . fulfill_cx . register_predicate_obligation (
10190 self . infcx ,
10291 Obligation :: new ( ObligationCause :: dummy ( ) , self . param_env , predicate) ,
0 commit comments