Skip to content

[literal_string_with_formatting_args] support for lazy_format #14894

Open
@madonuko

Description

@madonuko

Summary

literal_string_with_formatting_args does not support lazy_format::lazy_format!.

Lint Name

literal_string_with_formatting_args

Reproducer

warning: this looks like a formatting argument but it is not part of a formatting macro
   --> src/util.rs:387:54
    |
387 |             .note(lazy_format::lazy_format!("Status: {status}")),
    |                                                      ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args

Version

rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: x86_64-unknown-linux-gnu
release: 1.86.0
LLVM version: 19.1.7

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveL-nurseryLint: Currently in the nursery group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions