Skip to content

Formatting file empties file #11285

Closed
Closed
@Ten0

Description

@Ten0

rust-analyzer version: 0add6e9 2021-12-20 stable
rustc version: rustc 1.58.0 (02072b482 2022-01-11)

Formatting files that have @generated instead empties the whole file.
This issue will hit more users as we had to use rustfmt +nightly before to encounter it, while with the 1.58 release all users will be affected.

This only happens if format_generated_files is false in rustfmt.toml (newly released in 1.58).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions