Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#17747·rust-clippy

Rename `allow-mixed-uninlined-format-args`

Author: smoeliusCreated Sep 16, 2026Updated Oct 1, 2026
LabelsA-ui

Description

I humbly suggest that allow-mixed-uninlined-format-args (i.e, the configuration affecting uninlined_format_args) be renamed.

Recall, changing this configuration from true (its default) to false causes Clippy to flag the following code:

rust
format!("{} {}", var, 1+2); // Clippy suggests: format!("{var} {}", 1+2);

I personally find the configuration name confusing and difficult to read. Also, it recently confused Codex.

Transcript

So you think the configuration name is confusing?

Yes. I initially read:

toml
allow-mixed-uninlined-format-args = false

as “mixed positional and captured arguments are forbidden.”

Its actual meaning is closer to: “do not exempt an uninlined variable merely because the same format call also contains an expression that cannot be inlined.”

Thus Clippy accepts—and may produce—the mixed result:

rust
panic!("Could not parse config as `{}`: {error}", type_name::<T>())

Here, error is inlined, while the non-capturable expression remains positional. The configuration name describes when the lint tolerates uninlined arguments, not whether mixed formatting syntax itself is allowed, which makes it easy to misread.

Adding to the above, the fact that the default is true feels odd to me. A default of false feels more natural. Currently, there are 26 configurations that default to false, but only 14 that default to true, which I think supports this view.

Personally, I suggest the configuration be renamed to lint-inlinable-args-in-mixed-format-calls and have the default be false. Modulo the change in name and polarity, everything else about the configuration would stay the same.

I could submit a PR if the maintainers and @nyurik are agreeable to the change.

P.S. @nyurik I love the unlined_format_args lint!

Source: rust-lang/rust-clippy

View original on GitHubView discussion on GitHub