Skip to content

Formatting inside the lazy_static! macro did not work when the macro is used with the crate name: lazy_static::lazy_static! #6287

Open
@nejcgalof

Description

@nejcgalof

Formatting inside the lazy_static! macro did not work when the macro was used with the crate name: lazy_static::lazy_static!.

For example, that code is formatted well.

use lazy_static::lazy_static;
...
lazy_static! {
    static ref EXAMPLE: u8 = 42;
}

But when using the crate name directly with the macro, the macro is not formatted at all.

lazy_static::lazy_static! {
    static ref EXAMPLE: u8 = 42;
}

My prediction is that the problem is in that code, because the macro must match directly with the keyword: lazy_static!.

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