]> git.lizzy.rs Git - rust.git/commit
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix
authorbors <bors@rust-lang.org>
Tue, 31 Jan 2023 00:03:08 +0000 (00:03 +0000)
committerbors <bors@rust-lang.org>
Tue, 31 Jan 2023 00:03:08 +0000 (00:03 +0000)
commit487e83b711b96d84ce2edfc4cb4ba792c10b589e
tree6e79e3ff2f39930c60e7b1758d9ed8b4f3d6864c
parent001a77fac33f6560ff361ff38f661ff5f1c6bf85
parent80fcd7c40ec46613b130b5d732162ecbfda6c509
Auto merge of #105650 - cassaundra:float-literal-suggestion, r=pnkfelix

Fix invalid float literal suggestions when recovering an integer

Only suggest adding a zero to integers with a preceding dot when the change will result in a valid floating point literal.

For example, `.0x0` should not be turned into `0.0x0`.

r? nnethercote
compiler/rustc_parse/src/parser/expr.rs