mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Fix NumericLiteral::format that may produce a invalid literal
This commit is contained in:
@@ -162,6 +162,9 @@ pub fn format(&self) -> String {
|
||||
}
|
||||
|
||||
if let Some(suffix) = self.suffix {
|
||||
if output.ends_with('.') {
|
||||
output.push('0');
|
||||
}
|
||||
output.push('_');
|
||||
output.push_str(suffix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user