-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0e+10 is invalid whereas 00e+10 is valid #40408
Comments
It is a bug. |
IIRC at least. |
This is the relevant section in the reference: https://doc.rust-lang.org/reference.html#floating-point-literals It says:
and
i.e.
so all forms should parse. |
topecongiro
added a commit
to topecongiro/rust
that referenced
this issue
Mar 18, 2017
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 18, 2017
… r=nagisa Parse 0e+10 as a valid floating-point literal Fixes issue rust-lang#40408.
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Mar 19, 2017
… r=nagisa Parse 0e+10 as a valid floating-point literal Fixes issue rust-lang#40408.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Mar 19, 2017
… r=nagisa Parse 0e+10 as a valid floating-point literal Fixes issue rust-lang#40408.
I'm going to close this issue, because #40589 fixed it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found this line in the lexer prevents
0e+10
to be parsed as a float, whereas00e+10
is allowed anyway. Is this a bug or an intended behavior?This is a code I tested on Rust Playground:
It seems natural that both of them are banned or both of them are allowed.
The text was updated successfully, but these errors were encountered: