Closed
Description
The current behavior of rustfmt as of 8ec0750 is:
$ echo 'use ::serde::Serialize; mod serde {}' | cargo run --bin rustfmt
use serde::Serialize;
mod serde {}
That is, by default the rustfmt
cli command is assuming edition 2015. This assumption actually breaks the meaning of some 2018 style imports as seen in #3501.
Quoting from @topecongiro in #3501 (comment):
As the default edition of rustc and cargo are both 2018, I think it's reasonable to change the default edition of rustfmt to 2018 in 2.0.
Metadata
Metadata
Assignees
Labels
No labels