@@ -1651,8 +1651,7 @@ struct TyAliasRewriteInfo<'c, 'g>(
16511651 & ' c RewriteContext < ' c > ,
16521652 Indent ,
16531653 & ' g ast:: Generics ,
1654- ( ast:: TyAliasWhereClause , ast:: TyAliasWhereClause ) ,
1655- usize ,
1654+ ast:: TyAliasWhereClauses ,
16561655 symbol:: Ident ,
16571656 Span ,
16581657) ;
@@ -1672,23 +1671,14 @@ pub(crate) fn rewrite_type_alias<'a, 'b>(
16721671 ref bounds,
16731672 ref ty,
16741673 where_clauses,
1675- where_predicates_split,
16761674 } = * ty_alias_kind;
16771675 let ty_opt = ty. as_ref ( ) ;
16781676 let ( ident, vis) = match visitor_kind {
16791677 Item ( i) => ( i. ident , & i. vis ) ,
16801678 AssocTraitItem ( i) | AssocImplItem ( i) => ( i. ident , & i. vis ) ,
16811679 ForeignItem ( i) => ( i. ident , & i. vis ) ,
16821680 } ;
1683- let rw_info = & TyAliasRewriteInfo (
1684- context,
1685- indent,
1686- generics,
1687- where_clauses,
1688- where_predicates_split,
1689- ident,
1690- span,
1691- ) ;
1681+ let rw_info = & TyAliasRewriteInfo ( context, indent, generics, where_clauses, ident, span) ;
16921682 let op_ty = opaque_ty ( ty) ;
16931683 // Type Aliases are formatted slightly differently depending on the context
16941684 // in which they appear, whether they are opaque, and whether they are associated.
@@ -1724,19 +1714,11 @@ fn rewrite_ty<R: Rewrite>(
17241714 vis : & ast:: Visibility ,
17251715) -> Option < String > {
17261716 let mut result = String :: with_capacity ( 128 ) ;
1727- let TyAliasRewriteInfo (
1728- context,
1729- indent,
1730- generics,
1731- where_clauses,
1732- where_predicates_split,
1733- ident,
1734- span,
1735- ) = * rw_info;
1717+ let TyAliasRewriteInfo ( context, indent, generics, where_clauses, ident, span) = * rw_info;
17361718 let ( before_where_predicates, after_where_predicates) = generics
17371719 . where_clause
17381720 . predicates
1739- . split_at ( where_predicates_split ) ;
1721+ . split_at ( where_clauses . split ) ;
17401722 if !after_where_predicates. is_empty ( ) {
17411723 return None ;
17421724 }
@@ -1771,7 +1753,7 @@ fn rewrite_ty<R: Rewrite>(
17711753 let where_clause_str = rewrite_where_clause (
17721754 context,
17731755 before_where_predicates,
1774- where_clauses. 0 . 1 ,
1756+ where_clauses. before . span ,
17751757 context. config . brace_style ( ) ,
17761758 Shape :: legacy ( where_budget, indent) ,
17771759 false ,
@@ -1795,7 +1777,7 @@ fn rewrite_ty<R: Rewrite>(
17951777 let comment_span = context
17961778 . snippet_provider
17971779 . opt_span_before ( span, "=" )
1798- . map ( |op_lo| mk_sp ( where_clauses. 0 . 1 . hi ( ) , op_lo) ) ;
1780+ . map ( |op_lo| mk_sp ( where_clauses. before . span . hi ( ) , op_lo) ) ;
17991781
18001782 let lhs = match comment_span {
18011783 Some ( comment_span)
0 commit comments