Skip to content

Crash in debug mode #717

@mAarnos

Description

@mAarnos

If I try to run the debug version of rustfmt on the attached file (added .txt to the end to get around GitHub restrictions) then rustfmt crashes due to an arithmetic operation overflow like so

thread '<main>' panicked at 'arithmetic operation overflowed', src\lib.rs:351

This only happens if we use the windows format (i.e. CR+LF) for EOL stuff. I used the latest development version of rustfmt and compiled it with 1.5 stable on Windows 7.

main.rs.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, 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