diff options
| author | bors <bors@rust-lang.org> | 2024-12-28 03:06:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-28 03:06:22 +0000 |
| commit | 2b0ceb8c8c7d50b12ef29c7e37fb4f915389e28b (patch) | |
| tree | 01763e5f148230c1b18a64a998f8dcc1e368ad25 /compiler/rustc_parse/src/parser | |
| parent | ecc189922dac830ff866f4609311e6afcc4a91f6 (diff) | |
| parent | 0a09252866e87a1531584bb3066dbd7d51078408 (diff) | |
| download | rust-2b0ceb8c8c7d50b12ef29c7e37fb4f915389e28b.tar.gz rust-2b0ceb8c8c7d50b12ef29c7e37fb4f915389e28b.zip | |
Auto merge of #134839 - dtolnay:rollup-1jm11rl, r=dtolnay
Rollup of 4 pull requests Successful merges: - #134823 (Fix typos) - #134827 (Some random region tweaks) - #134833 (Skip parenthesis if `.` makes statement boundary unambiguous) - #134834 (Skip parenthesis around tuple struct field calls) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index aab4e1b1afc..7df7e732925 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -1336,7 +1336,7 @@ impl<'a> Parser<'a> { ) -> bool { if let ExprKind::Binary(op, l1, r1) = &inner_op.kind { if let ExprKind::Field(_, ident) = l1.kind - && ident.as_str().parse::<i32>().is_err() + && !ident.is_numeric() && !matches!(r1.kind, ExprKind::Lit(_)) { // The parser has encountered `foo.bar<baz`, the likelihood of the turbofish |
