@@ -3,13 +3,14 @@ pub mod on_unimplemented;
3
3
pub mod suggestions;
4
4
5
5
use super :: {
6
- FulfillmentContext , FulfillmentError , FulfillmentErrorCode , MismatchedProjectionTypes ,
7
- Obligation , ObligationCause , ObligationCauseCode , OutputTypeParameterMismatch , Overflow ,
8
- PredicateObligation , SelectionContext , SelectionError , TraitNotObjectSafe ,
6
+ FulfillmentError , FulfillmentErrorCode , MismatchedProjectionTypes , Obligation , ObligationCause ,
7
+ ObligationCauseCode , OutputTypeParameterMismatch , Overflow , PredicateObligation ,
8
+ SelectionContext , SelectionError , TraitNotObjectSafe ,
9
9
} ;
10
10
use crate :: infer:: error_reporting:: { TyCategory , TypeAnnotationNeeded as ErrorCode } ;
11
11
use crate :: infer:: type_variable:: { TypeVariableOrigin , TypeVariableOriginKind } ;
12
12
use crate :: infer:: { self , InferCtxt , TyCtxtInferExt } ;
13
+ use crate :: traits:: engine:: TraitEngineExt as _;
13
14
use crate :: traits:: query:: evaluate_obligation:: InferCtxtExt as _;
14
15
use crate :: traits:: query:: normalize:: AtExt as _;
15
16
use crate :: traits:: specialize:: to_pretty_impl_header;
@@ -352,7 +353,7 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
352
353
} )
353
354
. to_predicate ( self . tcx ) ,
354
355
) ;
355
- let mut fulfill_cx = FulfillmentContext :: new_in_snapshot ( ) ;
356
+ let mut fulfill_cx = < dyn TraitEngine < ' tcx > > :: new_in_snapshot ( self . tcx ) ;
356
357
fulfill_cx. register_predicate_obligation ( self , obligation) ;
357
358
if fulfill_cx. select_all_or_error ( self ) . is_empty ( ) {
358
359
return Ok ( (
0 commit comments