Rustfmt: What is the point of the unstable_features flag?

Created on 11 Dec 2018  Â·  3Comments  Â·  Source: rust-lang/rustfmt

The documentation of unstable_features says:

Enable unstable features on stable channel.

But the option itself is only available on nightly. So how am I supposed to enable this if I am using stable rustfmt?
I wanted to use this to have unstable formatting options on a stable toolchain without having to install that one separately.

good first issue

Most helpful comment

I thought that is implicit? I.e. if you are on an unstable toolchain, you
already have unstable features? Or is the flag for opting out of unstable
festures on an unstable toolchain?

Even if it's a documentation bug, it would be cool if the feature that I
expected would exist :D
It's a pain having to install 2 rust versions in CI if you want to test
against stable but would like to use unstable format options and verify
formatting in CI using --check.

On Mon, 7 Jan 2019, 03:28 Nick Cameron, notifications@github.com wrote:

It should read "Enable unstable features on unstable channel". That is
you have to opt-in on unstable, and can't use them at all on stable. So
this is a documentation bug.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rustfmt/issues/3247#issuecomment-451803432,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFO3NTGbmgft0X4gRDZPMVIn5erlSqyvks5vArDggaJpZM4ZMuLR
.

All 3 comments

Hmm, I think we should have made unstable_features stable before releasing 1.0.0.

It should read "Enable unstable features on unstable channel". That is you have to opt-in on unstable, and can't use them at all on stable. So this is a documentation bug.

I thought that is implicit? I.e. if you are on an unstable toolchain, you
already have unstable features? Or is the flag for opting out of unstable
festures on an unstable toolchain?

Even if it's a documentation bug, it would be cool if the feature that I
expected would exist :D
It's a pain having to install 2 rust versions in CI if you want to test
against stable but would like to use unstable format options and verify
formatting in CI using --check.

On Mon, 7 Jan 2019, 03:28 Nick Cameron, notifications@github.com wrote:

It should read "Enable unstable features on unstable channel". That is
you have to opt-in on unstable, and can't use them at all on stable. So
this is a documentation bug.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rustfmt/issues/3247#issuecomment-451803432,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFO3NTGbmgft0X4gRDZPMVIn5erlSqyvks5vArDggaJpZM4ZMuLR
.

Was this page helpful?
0 / 5 - 0 ratings