Skip to content

Commit 895a31f

Browse files
committed
Fix split calculation in type alias where clauses
1 parent ac951d3 commit 895a31f

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ impl<'a> Parser<'a> {
10241024
has_where_token: after_where_clause.has_where_token,
10251025
span: after_where_clause.span,
10261026
},
1027-
split: before_where_clause.predicates.len(),
1027+
split: before_where_clause.predicates.iter().filter(|p| p.attrs.is_empty()).count(),
10281028
};
10291029
let mut predicates = before_where_clause.predicates;
10301030
predicates.extend(after_where_clause.predicates);

0 commit comments

Comments
 (0)