Skip to content

rustfmt result are not reproducable with indent_style = "Visual" #2496

Closed
@alatiera

Description

@alatiera

We want to start using rustfmt on the code base of librsvg. I've stumbled on a bug though where if you run rustfmt once it will change the files, but if run again it will reset them to the previous state. This seem to happen no matter which of those 2 states the code base sits. I am not sure how to describe it better.

This is sort of a blocker since the CI rustfmt test will always fail :(

Using rustfmt 0.3.8

➜ rustfmt -Vv 
0.3.8-nightly ( )

I've made a separate branch to test this.

Steps to reproduce:

  • git clone https://gitlab.gnome.org/alatiera/librsvg.git --branch rustfmt-visual-bug
  • Run cargo fmt --all
  • watch the diff
  • Run cargo fmt --all again
  • Files should be reverted to the same state as in the repo
  • Repeat endlessly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.only-with-optionrequires a non-default option value to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions