Skip to content

Rustfmt is creating my code uncompilable #4615

Closed
@manio

Description

@manio

Hi. I think I found a bug in rust fmt.
The following good and compilable code:

        info!(//debug
            "{}: sending function_code={:04x} data={:04x} crc=0x{:04X} data={:02X?}",
            self.name, function_code, data, crc, output_cmd
        );

is wrongly formatted to this:

        info!(
            //debug "{}: sending function_code={:04x} data={:04x} crc=0x{:04X} data={:02X?}",
            self.name, function_code, data, crc, output_cmd
        );

Meta

  • rustfmt version: rustfmt 1.4.14-nightly (a5cb5d2 2020-04-14)
  • From where did you install rustfmt?: rustup
  • How do you run rustfmt: cargo-fmt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions