@@ -13,7 +13,7 @@ use ty::{self, Ty, TyCtxt};
13
13
use hir:: def_id:: DefId ;
14
14
15
15
use super :: { FulfillmentContext , FulfillmentError } ;
16
- use super :: { ObligationCause , PredicateObligation , PendingPredicateObligation } ;
16
+ use super :: { ObligationCause , PendingPredicateObligation , PredicateObligation } ;
17
17
18
18
pub trait TraitEngine < ' tcx > {
19
19
fn normalize_projection_type < ' a , ' gcx > (
@@ -52,18 +52,20 @@ pub trait TraitEngine<'tcx> {
52
52
fn pending_obligations ( & self ) -> Vec < PendingPredicateObligation < ' tcx > > ;
53
53
}
54
54
55
- impl < ' a , ' gcx , ' tcx > dyn TraitEngine < ' tcx > +' tcx {
56
- pub fn new ( _tcx : TyCtxt < ' _ , ' _ , ' tcx > ) -> Box < Self > {
57
- Box :: new ( FulfillmentContext :: new ( ) )
58
- }
55
+ impl < ' a , ' gcx , ' tcx > TraitEngine < ' tcx > + ' tcx {
56
+ pub fn new ( _tcx : TyCtxt < ' _ , ' _ , ' tcx > ) -> Box < Self > {
57
+ Box :: new ( FulfillmentContext :: new ( ) )
58
+ }
59
59
60
- pub fn register_predicate_obligations < I > ( & mut self ,
61
- infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
62
- obligations : I )
63
- where I : IntoIterator < Item = PredicateObligation < ' tcx > >
64
- {
65
- for obligation in obligations {
66
- self . register_predicate_obligation ( infcx, obligation) ;
67
- }
68
- }
60
+ pub fn register_predicate_obligations < I > (
61
+ & mut self ,
62
+ infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
63
+ obligations : I ,
64
+ ) where
65
+ I : IntoIterator < Item = PredicateObligation < ' tcx > > ,
66
+ {
67
+ for obligation in obligations {
68
+ self . register_predicate_obligation ( infcx, obligation) ;
69
+ }
70
+ }
69
71
}
0 commit comments