@@ -41,14 +41,14 @@ where
4141 // `{type error}` if the alias still contains infer vars, so we also
4242 // accept alias-relate goals where one of the terms is an error.
4343 debug_assert ! (
44- lhs. to_alias_term( ) . is_some( )
45- || rhs. to_alias_term( ) . is_some( )
44+ lhs. to_alias_term( self . cx ( ) ) . is_some( )
45+ || rhs. to_alias_term( self . cx ( ) ) . is_some( )
4646 || lhs. is_error( )
4747 || rhs. is_error( )
4848 ) ;
4949
5050 // Structurally normalize the lhs.
51- let lhs = if let Some ( alias) = lhs. to_alias_term ( ) {
51+ let lhs = if let Some ( alias) = lhs. to_alias_term ( self . cx ( ) ) {
5252 let term = self . next_term_infer_of_kind ( lhs) ;
5353 self . add_goal (
5454 GoalSource :: TypeRelating ,
6060 } ;
6161
6262 // Structurally normalize the rhs.
63- let rhs = if let Some ( alias) = rhs. to_alias_term ( ) {
63+ let rhs = if let Some ( alias) = rhs. to_alias_term ( self . cx ( ) ) {
6464 let term = self . next_term_infer_of_kind ( rhs) ;
6565 self . add_goal (
6666 GoalSource :: TypeRelating ,
8787 ty:: AliasRelationDirection :: Equate => ty:: Invariant ,
8888 ty:: AliasRelationDirection :: Subtype => ty:: Covariant ,
8989 } ;
90- match ( lhs. to_alias_term ( ) , rhs. to_alias_term ( ) ) {
90+ match ( lhs. to_alias_term ( self . cx ( ) ) , rhs. to_alias_term ( self . cx ( ) ) ) {
9191 ( None , None ) => {
9292 self . relate ( param_env, lhs, variance, rhs) ?;
9393 self . evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
0 commit comments