thread 'rustc' panicked at 'unexpected components in a float token #90728
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I'm seeing an internal compiler error on the following input, found by fuzz-rustc:
Code
Error output
The ICE happens after correctly reporting a malformed float error, so low priority. Affected versions: probably all versions since that panic was introduced, I tried nightly 2021-11-07 and stable 1.56.1 and they both show the same ICE.
Backtrace
A quick inspection of the code shows that the similar case
1e+
is handled the same as1e+2
:rust/compiler/rustc_parse/src/parser/expr.rs
Lines 1031 to 1041 in 87df4dd
So if I had to guess I would say that the match is missing this one case, so
1.2e+
should be handled the same as1.2e+3
:But no idea what does that code even do, it has a FIXME by @petrochenkov so maybe he knows better.
The text was updated successfully, but these errors were encountered: