diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-19 14:25:33 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-29 17:18:40 +0100 |
| commit | 2b8060578a4a7dafc74f782850c86762ec05857a (patch) | |
| tree | 8eb3dc8766f9ea47c2f346411918c62442347c93 /compiler/rustc_parse/src/parser | |
| parent | 384d26fc7e3bdd7687cc17b2662b091f6017ec2a (diff) | |
| download | rust-2b8060578a4a7dafc74f782850c86762ec05857a.tar.gz rust-2b8060578a4a7dafc74f782850c86762ec05857a.zip | |
AST: Refactor type alias where clauses
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index a678194372e..d8587f1340a 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -971,11 +971,17 @@ impl<'a> Parser<'a> { let after_where_clause = self.parse_where_clause()?; - let where_clauses = ( - TyAliasWhereClause(before_where_clause.has_where_token, before_where_clause.span), - TyAliasWhereClause(after_where_clause.has_where_token, after_where_clause.span), - ); - let where_predicates_split = before_where_clause.predicates.len(); + let where_clauses = TyAliasWhereClauses { + before: TyAliasWhereClause { + has_where_token: before_where_clause.has_where_token, + span: before_where_clause.span, + }, + after: TyAliasWhereClause { + has_where_token: after_where_clause.has_where_token, + span: after_where_clause.span, + }, + split: before_where_clause.predicates.len(), + }; let mut predicates = before_where_clause.predicates; predicates.extend(after_where_clause.predicates); let where_clause = WhereClause { @@ -994,7 +1000,6 @@ impl<'a> Parser<'a> { defaultness, generics, where_clauses, - where_predicates_split, bounds, ty, })), |
