Skip to content

unstable features are usable on stable with the '--config' option #4081

Closed
@bmwill

Description

@bmwill

If you place an unstable config in a rustfmt.toml config file and run
using a stable version of rustfmt the config is ignored and you get the
following:

$ cargo fmt
Warning: can't set `merge_imports = true`, unstable features are only available in nightly channel.

But if you instead pass the config using the '--config' option rustfmt
happily applies and uses the unstable config:

$ cargo fmt -- --config merge_imports=true

I don't know if this is intentional or not but it gave me a workaround for using the 'merge_imports' feature while using a stable toolchain: diem/diem#2926

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPanic, non-idempotency, invalid code, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions