diff options
| author | bors <bors@rust-lang.org> | 2024-02-29 21:47:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-29 21:47:54 +0000 |
| commit | 77be7a3e0df908c5ea9ea4a70d209782a7299b4b (patch) | |
| tree | 41a606aaf853443b75d56e7df03f8540486aa488 /compiler/rustc_parse/src/parser | |
| parent | 878c8a2a62d49ca5c454547ad67290a1df746cb5 (diff) | |
| parent | b961f25c215bb9796bc4893103034938af3e5dc3 (diff) | |
| download | rust-77be7a3e0df908c5ea9ea4a70d209782a7299b4b.tar.gz rust-77be7a3e0df908c5ea9ea4a70d209782a7299b4b.zip | |
Auto merge of #121810 - matthiaskrgr:rollup-mawij2g, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #121326 (Detect empty leading where clauses on type aliases) - #121464 (rustc: Fix wasm64 metadata object files) - #121681 (Safe Transmute: Revise safety analysis) - #121753 (Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths) - #121782 (allow statics pointing to mutable statics) - #121798 (Fix links in rustc doc) - #121806 (add const test for ptr::metadata) - #121809 (Remove doc aliases to PATH) r? `@ghost` `@rustbot` modify labels: rollup
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, })), |
