Skip to content

error[internal]: left behind trailing whitespace #4804

Open
@hellow554

Description

@hellow554

Describe the bug

rustfmt fails with an internal error:

error[internal]: left behind trailing whitespace
 --> stdin:3:3:0
  |
3 |
  | ^^^^^^^^
  |

warning: rustfmt has failed to format. See previous 1 errors.

To Reproduce

echo 'Zm4gdHJpbUdvb2QoKSB7CiAgICBpZiBsZXQgU29tZShxKSA9IGxhc3QgJiYgaSAhPSAwIHsKICAgICAgICAKICAgICAgICB9Cn0K' | base64 -d | rustfmt

Meta

  • rustfmt 1.4.36-stable (7de6968 2021-02-07)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: rustfmt

Activity

added
bugPanic, non-idempotency, invalid code, etc.
on Apr 19, 2021
hellow554

hellow554 commented on Apr 19, 2021

@hellow554
ContributorAuthor

This is probably due to the new if let chain feature

calebcartwright

calebcartwright commented on Apr 21, 2021

@calebcartwright
Member

Thanks for the report!

hellow554

hellow554 commented on Apr 28, 2021

@hellow554
ContributorAuthor

Also occurs on rustfmt 2.0.0-rc.2-nightly (94035f91 2021-04-07)

added
e-trailing whitespaceerror[internal]: left behind trailing whitespace
and removed
bugPanic, non-idempotency, invalid code, etc.
on Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hellow554@calebcartwright@ytmimi

        Issue actions

          error[internal]: left behind trailing whitespace · Issue #4804 · rust-lang/rustfmt