@@ -139,14 +139,14 @@ impl<'a> AstValidator<'a> {
139139        ty_alias :  & TyAlias , 
140140    )  -> Result < ( ) ,  errors:: WhereClauseBeforeTypeAlias >  { 
141141        let  before_predicates =
142-             ty_alias. generics . where_clause . predicates . split_at ( ty_alias. where_predicates_split ) . 0 ; 
142+             ty_alias. generics . where_clause . predicates . split_at ( ty_alias. where_clauses . split ) . 0 ; 
143143
144144        if  ty_alias. ty . is_none ( )  || before_predicates. is_empty ( )  { 
145145            return  Ok ( ( ) ) ; 
146146        } 
147147
148148        let  mut  state = State :: new ( ) ; 
149-         if  !ty_alias. where_clauses . 1 . 0  { 
149+         if  !ty_alias. where_clauses . after . has_where_token  { 
150150            state. space ( ) ; 
151151            state. word_space ( "where" ) ; 
152152        }  else  { 
@@ -161,13 +161,13 @@ impl<'a> AstValidator<'a> {
161161            state. print_where_predicate ( p) ; 
162162        } 
163163
164-         let  span = ty_alias. where_clauses . 0 . 1 ; 
164+         let  span = ty_alias. where_clauses . before . span ; 
165165        Err ( errors:: WhereClauseBeforeTypeAlias  { 
166166            span, 
167167            sugg :  errors:: WhereClauseBeforeTypeAliasSugg  { 
168168                left :  span, 
169169                snippet :  state. s . eof ( ) , 
170-                 right :  ty_alias. where_clauses . 1 . 1 . shrink_to_hi ( ) , 
170+                 right :  ty_alias. where_clauses . after . span . shrink_to_hi ( ) , 
171171            } , 
172172        } ) 
173173    } 
@@ -457,8 +457,7 @@ impl<'a> AstValidator<'a> {
457457    fn  check_foreign_ty_genericless ( 
458458        & self , 
459459        generics :  & Generics , 
460-         before_where_clause :  & TyAliasWhereClause , 
461-         after_where_clause :  & TyAliasWhereClause , 
460+         where_clauses :  & TyAliasWhereClauses , 
462461    )  { 
463462        let  cannot_have = |span,  descr,  remove_descr| { 
464463            self . dcx ( ) . emit_err ( errors:: ExternTypesCannotHave  { 
@@ -473,14 +472,14 @@ impl<'a> AstValidator<'a> {
473472            cannot_have ( generics. span ,  "generic parameters" ,  "generic parameters" ) ; 
474473        } 
475474
476-         let  check_where_clause = |where_clause :  & TyAliasWhereClause | { 
477-             if  let   TyAliasWhereClause ( true ,  where_clause_span )  =  where_clause { 
478-                 cannot_have ( * where_clause_span ,  "`where` clauses" ,  "`where` clause" ) ; 
475+         let  check_where_clause = |where_clause :  TyAliasWhereClause | { 
476+             if  where_clause. has_where_token  { 
477+                 cannot_have ( where_clause . span ,  "`where` clauses" ,  "`where` clause" ) ; 
479478            } 
480479        } ; 
481480
482-         check_where_clause ( before_where_clause ) ; 
483-         check_where_clause ( after_where_clause ) ; 
481+         check_where_clause ( where_clauses . before ) ; 
482+         check_where_clause ( where_clauses . after ) ; 
484483    } 
485484
486485    fn  check_foreign_kind_bodyless ( & self ,  ident :  Ident ,  kind :  & str ,  body :  Option < Span > )  { 
@@ -1122,9 +1121,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
11221121                    if  let  Err ( err)  = self . check_type_alias_where_clause_location ( ty_alias)  { 
11231122                        self . dcx ( ) . emit_err ( err) ; 
11241123                    } 
1125-                 }  else  if  where_clauses. 1 . 0  { 
1124+                 }  else  if  where_clauses. after . has_where_token  { 
11261125                    self . dcx ( ) . emit_err ( errors:: WhereClauseAfterTypeAlias  { 
1127-                         span :  where_clauses. 1 . 1 , 
1126+                         span :  where_clauses. after . span , 
11281127                        help :  self . session . is_nightly_build ( ) . then_some ( ( ) ) , 
11291128                    } ) ; 
11301129                } 
@@ -1154,7 +1153,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
11541153                self . check_defaultness ( fi. span ,  * defaultness) ; 
11551154                self . check_foreign_kind_bodyless ( fi. ident ,  "type" ,  ty. as_ref ( ) . map ( |b| b. span ) ) ; 
11561155                self . check_type_no_bounds ( bounds,  "`extern` blocks" ) ; 
1157-                 self . check_foreign_ty_genericless ( generics,  & where_clauses. 0 ,   & where_clauses . 1 ) ; 
1156+                 self . check_foreign_ty_genericless ( generics,  where_clauses) ; 
11581157                self . check_foreign_item_ascii_only ( fi. ident ) ; 
11591158            } 
11601159            ForeignItemKind :: Static ( _,  _,  body)  => { 
0 commit comments