diff options
| author | bors <bors@rust-lang.org> | 2021-07-13 14:31:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-07-13 14:31:02 +0000 |
| commit | 8131445e536869b4b73b07d1be1b2e03f7493898 (patch) | |
| tree | eaf87cfe60eed75f6872ec34d3082911de7b1c72 /clippy_utils | |
| parent | bf4512ef57aaaebcf537af47380026d40238685b (diff) | |
| parent | 25e4c7d73fd4c929208edf151c827f6c97318374 (diff) | |
| download | rust-8131445e536869b4b73b07d1be1b2e03f7493898.tar.gz rust-8131445e536869b4b73b07d1be1b2e03f7493898.zip | |
Auto merge of #7446 - Y-Nak:fix-7445, r=xFrednet,flip1995
`default_numeric_fallback`: Fix FP with floating literal Fix #7445 changelog: `default_numeric_fallback`: Fix FP with floating literal
Diffstat (limited to 'clippy_utils')
| -rw-r--r-- | clippy_utils/src/numeric_literal.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clippy_utils/src/numeric_literal.rs b/clippy_utils/src/numeric_literal.rs index 546706d51d7..4a28c7dd9a0 100644 --- a/clippy_utils/src/numeric_literal.rs +++ b/clippy_utils/src/numeric_literal.rs @@ -162,6 +162,9 @@ impl<'a> NumericLiteral<'a> { } if let Some(suffix) = self.suffix { + if output.ends_with('.') { + output.push('0'); + } output.push('_'); output.push_str(suffix); } |
