diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-01-23 06:14:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 06:14:06 +0000 |
| commit | e923d85be4a6ea0e4a1668ed01b27dabbbe76d68 (patch) | |
| tree | 54f062fc900e21f132ed2161ffe6b1e50382e172 /compiler/rustc_parse/src/parser | |
| parent | 49375c48f7748debfdbfab9cccc450235e72bb74 (diff) | |
| parent | ee7b83a3b3a98888ef1d73381f923050a19c0c79 (diff) | |
| download | rust-e923d85be4a6ea0e4a1668ed01b27dabbbe76d68.tar.gz rust-e923d85be4a6ea0e4a1668ed01b27dabbbe76d68.zip | |
Merge pull request #4145 from rust-lang/rustup-2025-01-23
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 7533e75ffe2..5cd02128287 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2095,7 +2095,7 @@ impl<'a> Parser<'a> { // point literal here, since there's no use of the exponent // syntax that also constitutes a valid integer, so we need // not check for that. - if suffix.map_or(true, |s| s == sym::f32 || s == sym::f64) + if suffix.is_none_or(|s| s == sym::f32 || s == sym::f64) && symbol.as_str().chars().all(|c| c.is_numeric() || c == '_') && self.token.span.hi() == next_token.span.lo() { |
