Skip to content

Method call on 0. float literals formats to incorrect code #5791

Closed
@fee1-dead

Description

@fee1-dead
pub fn main() {
    0. .to_string();
}

formats currently to:

pub fn main() {
    0..to_string();
}

Ideally this should be reformatted to be:

pub fn main() {
    (0.).to_string();
}

so as to avoid confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-chainsbugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions