Skip to content

use_small_heuristics = false gives a mix of zero width and max width settings #2299

Closed
@philipc

Description

@philipc

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 documents width_heuristics, and you can set it in the config without any warnings about unknown settings, but the values have no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    only-with-optionrequires a non-default option value to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions