diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-19 17:33:46 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-19 19:15:06 +1000 |
| commit | 64c2e9ed3bfb6d6e8f9463f90d4eefa736242b8e (patch) | |
| tree | fb3cafd0be3b2ce7b0bd302c546fcbd3d86de98f /tests/ui | |
| parent | 8170acb197d7658505949cefc12e01dfc4c8feab (diff) | |
| download | rust-64c2e9ed3bfb6d6e8f9463f90d4eefa736242b8e.tar.gz rust-64c2e9ed3bfb6d6e8f9463f90d4eefa736242b8e.zip | |
Change how `parse_expr_force_collect` works.
It now parses outer attributes before collecting tokens. This avoids the problem where the outer attribute tokens were being stored twice -- for the attribute tokesn, and also for the expression tokens. Fixes #86055.
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout index 6523f2485cd..0168689b605 100644 --- a/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout +++ b/tests/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout @@ -1,4 +1,4 @@ -PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = #[allow(warnings)] #[allow(warnings)] 0; 0 }, } +PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = #[allow(warnings)] 0; 0 }, } PRINT-DERIVE INPUT (DEBUG): TokenStream [ Ident { ident: "enum", @@ -64,31 +64,6 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [ ], span: #0 bytes(544..561), }, - Punct { - ch: '#', - spacing: Alone, - span: #0 bytes(543..544), - }, - Group { - delimiter: Bracket, - stream: TokenStream [ - Ident { - ident: "allow", - span: #0 bytes(545..550), - }, - Group { - delimiter: Parenthesis, - stream: TokenStream [ - Ident { - ident: "warnings", - span: #0 bytes(551..559), - }, - ], - span: #0 bytes(550..560), - }, - ], - span: #0 bytes(544..561), - }, Literal { kind: Integer, symbol: "0", |
