You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong calc fn_call_width vs. max_width for default use_small_heuristics #6601
Seems to fn_call_width and other which depends on use_small_heuristics = "Default" calculated incorrectly (or I just don't understand how it works 🤷🏻♂️).
How to reproduce:
Run rustfmt -v --check with config below.
Message:
`fn_call_width` cannot have a value that exceeds `max_width`. `fn_call_width` will be set to the same value as `max_width`
`attr_fn_like_width` cannot have a value that exceeds `max_width`. `attr_fn_like_width` will be set to the same value as `max_width`
`struct_lit_width` cannot have a value that exceeds `max_width`. `struct_lit_width` will be set to the same value as `max_width`
`struct_variant_width` cannot have a value that exceeds `max_width`. `struct_variant_width` will be set to the same value as `max_width`
`array_width` cannot have a value that exceeds `max_width`. `array_width` will be set to the same value as `max_width`
`chain_width` cannot have a value that exceeds `max_width`. `chain_width` will be set to the same value as `max_width`
`single_line_if_else_max_width` cannot have a value that exceeds `max_width`. `single_line_if_else_max_width` will be set to the same value as `max_width`
`single_line_let_else_max_width` cannot have a value that exceeds `max_width`. `single_line_let_else_max_width` will be set to the same value as `max_width`
Activity
ytmimi commentedon Jul 9, 2025
@boozook please provide a code snippet we can use to verify the issue, thanks!
ytmimi commentedon Jul 9, 2025
Though this feels like a duplicate of #5404
boozook commentedon Jul 9, 2025
@ytmimi Uh, sorry, really looks similar. But I not 100%-sure.
Just tested with minimal reproducible code snippet from #5404 that you've mentioned - yes, it is!
Close this issue freely if necessary, sorry for duplicate if it is so. Thanks!
max_width = 100#5404