Skip to content

Conversation

csmulhern
Copy link

@csmulhern csmulhern commented Sep 3, 2025

Fixes #5404.

Minimal example:

macro_rules! foo {
    () => {
        println!("Hello, world!");
    };
}

Without this change:

> cargo run --bin rustfmt -- --config-path=/dev/null --config=max_width=100 --config=fn_call_width=100 ~/Desktop/example.rs
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/rustfmt --config-path=/dev/null --config=max_width=100 --config=fn_call_width=100 /Users/cameron/Desktop/example.rs`
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`

With this change:

> cargo run --bin rustfmt -- --config-path=/dev/null --config=max_width=100 --config=fn_call_width=100 ~/Desktop/example.rs
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/rustfmt --config-path=/dev/null --config=max_width=100 --config=fn_call_width=100 /Users/cameron/Desktop/example.rs`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set granular width configuration settings to 100% if max_width = 100
2 participants