rust-lang / rust-lang/rust-clippy

[literal_string_with_formatting_args] support for `lazy_format`

Open
#14,894 6 comments 0 reactions 1 assignee View on GitHub

@J0s3c4rl0s is already working on this.

Since Sep 6, 2025.

C-bug I-false-positive L-nursery
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.