-
Notifications
You must be signed in to change notification settings - Fork 926
use_small_heuristics = false gives a mix of zero width and max width settings #2299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The motivation for 0 vs max width is that for each heuristic, the effect is that the heuristic is turned off. If that is not the case, then there is a bug we should fix. So setting |
It does turn the heuristics off, but there's two classes of heuristics:
I want an option to only disable heuristics for the first class. |
@radix That's now cramming long if statements and structs on one line, so I'd probably go with the default heuristics still. |
This is basically a dup of #2437. We've also changed the values to |
Previously I was using the individual width settings to stop rustfmt from splitting things across multiple lines at less than 100 characters width. This was changed for #1984. I'm fine with having a single setting to configure all of this, but the problem is that
WidthHeuristics::null()
specifies max width for half the settings, and 0 width for the others, which doesn't make much sense to me, because it means some things are put on a single line, and others are always split over multiple lines, whereas my goal is to stop needlessly splitting lines. Can we have an intermediate setting that only sets the max width values, and leaves the others at default width?Also related,
rustfmt --config-help
documentswidth_heuristics
, and you can set it in the config without any warnings about unknown settings, but the values have no effect.The text was updated successfully, but these errors were encountered: