Summary
I tried to format this code:
impl Blah {
#[rustfmt::skip]
fn foo() {
{
{
select! {
_ = bar() => {
info!(
"WebAuthn challenge cache cleanup: __ registration, __ login, __ 2FA, __ email-change entries remaining",
);
},
}
}
}
}
}
(I tried to make it as small as possible without making the error go away)
Expected behavior
I expected to see this happen: Since I have rustfmt::skip, rustfmt should not concern itself with this function.
Actual behavior
Instead, this happened:
❯ rustup run nightly -- rustfmt foo.rs
error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 133)
--> /home/alex/Documents/Projects/foo.rs:9:9:101
|
9 | ... "WebAuthn challenge cache cleanup: __ registration, __ login, __ 2FA, __ email-change entries remaining",
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: set `error_on_unformatted = false` to suppress the warning against comments or string literals
Configuration
rustfmt configuration file (e.g. rustfmt.toml, if applicable):
edition = "2024"
error_on_line_overflow = true
error_on_unformatted = true
Reproduction Steps
Run rustfmt on the code above with the configuration above.
Meta
rustfmt --version:
rustfmt 1.9.0-nightly (bd08c9e718 2026-06-25)
Summary
I tried to format this code:
(I tried to make it as small as possible without making the error go away)
Expected behavior
I expected to see this happen: Since I have
rustfmt::skip,rustfmtshould not concern itself with this function.Actual behavior
Instead, this happened:
Configuration
rustfmtconfiguration file (e.g.rustfmt.toml, if applicable):Reproduction Steps
Run
rustfmton the code above with the configuration above.Meta
rustfmt --version: