@@ -6,7 +6,6 @@ use rustc_infer::infer::DefineOpaqueTypes;
66use rustc_infer:: traits:: ProjectionCacheKey ;
77use rustc_infer:: traits:: { PolyTraitObligation , SelectionError , TraitEngine } ;
88use rustc_middle:: mir:: interpret:: ErrorHandled ;
9- use rustc_middle:: traits:: DefiningAnchor ;
109use rustc_middle:: ty:: abstract_const:: NotConstEvaluatable ;
1110use rustc_middle:: ty:: error:: { ExpectedFound , TypeError } ;
1211use rustc_middle:: ty:: GenericArgsRef ;
@@ -626,27 +625,9 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
626625 }
627626 }
628627 ty:: PredicateKind :: Ambiguous => ProcessResult :: Unchanged ,
629- ty:: PredicateKind :: AliasRelate ( ..)
630- if matches ! ( self . selcx. infcx. defining_use_anchor, DefiningAnchor :: Bubble ) =>
631- {
632- ProcessResult :: Unchanged
628+ ty:: PredicateKind :: AliasRelate ( ..) => {
629+ bug ! ( "AliasRelate is only used for new solver" )
633630 }
634- ty:: PredicateKind :: AliasRelate ( a, b, relate) => match relate {
635- ty:: AliasRelationDirection :: Equate => match self
636- . selcx
637- . infcx
638- . at ( & obligation. cause , obligation. param_env )
639- . eq ( DefineOpaqueTypes :: Yes , a, b)
640- {
641- Ok ( inf_ok) => ProcessResult :: Changed ( mk_pending ( inf_ok. into_obligations ( ) ) ) ,
642- Err ( _) => ProcessResult :: Error ( FulfillmentErrorCode :: CodeSelectionError (
643- SelectionError :: Unimplemented ,
644- ) ) ,
645- } ,
646- ty:: AliasRelationDirection :: Subtype => {
647- bug ! ( "AliasRelate with subtyping is only used for new solver" )
648- }
649- } ,
650631 ty:: PredicateKind :: Clause ( ty:: ClauseKind :: ConstArgHasType ( ct, ty) ) => {
651632 match self . selcx . infcx . at ( & obligation. cause , obligation. param_env ) . eq (
652633 DefineOpaqueTypes :: No ,
0 commit comments