mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 13:36:49 +00:00
handle exponent without digits
This commit is contained in:
parent
60258b061d
commit
85002b09a1
@ -161,7 +161,7 @@ impl<'a> NumericLiteral<'a> {
|
||||
}
|
||||
|
||||
if let Some((separator, exponent)) = self.exponent {
|
||||
if exponent != "0" {
|
||||
if !exponent.is_empty() && exponent != "0" {
|
||||
output.push_str(separator);
|
||||
Self::group_digits(&mut output, exponent, group_size, true, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user