Skip to content

Contents of module with different name gets overwritten on other platform #3956

Closed
@JoNil

Description

@JoNil

I have a file with

#[cfg_attr(target_vendor = "nintendo64", path = "graphics.rs")]
#[cfg_attr(not(target_vendor = "nintendo64"), path = "graphics_emu.rs")]
pub mod graphics;

So when i run cargo fmt the contents of the file graphics_emu.rs is written to the file graphics.rs.

I would expect them both to be formatted and kept in their separate files.

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