Thanks for your work on rustfmt!
The granular width configuration settings are documented to be percentages of max_width (e.g. chain_width). However when max_width is set to 100 setting their values to 100 causes a warning
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
The error message is both surprising and incorrect since fn_call_width = 100 is not a value that exceeds max_width.
This does not happen if max_width is 99 or 101.
The exact config options that trigger this bug are:
max_width = 100
use_small_heuristics = "Off"
fn_call_width = 100
$ rustfmt --version
rustfmt 1.4.38-stable (fe5b13d 2022-05-18)
Edit by
@ytmimi (add a minimal reproducible code snippet):
macro_rules! foo {
() => {};
}
Thanks for your work on rustfmt!
The granular width configuration settings are documented to be percentages of
max_width(e.g. chain_width). However whenmax_widthis set to 100 setting their values to100causes a warningThe error message is both surprising and incorrect since
fn_call_width = 100is not a value that exceedsmax_width.This does not happen if
max_widthis 99 or 101.The exact config options that trigger this bug are:
Edit by @ytmimi (add a minimal reproducible code snippet):