Build errors with edition=2018 after clean cargo fix --edition
#55592
Labels
A-rust-2018-preview
Area: The 2018 edition preview
C-bug
Category: This is a bug.
S-needs-repro
Status: This issue has no reproduction and needs a reproduction to make progress.
With
nightly-2018-11-01
in Servo, after finally gettingcargo fix --edition
to complete without warnings. (Which was not easy: rust-lang/rustfix#149, https://github.com/rust-lang-nursery/rustfix/issues/150), I addededition = "2018"
to (almost) allCargo.toml
files.At this point, the theory is that
cargo check
should Just Work, but it doesn’t. I’ve hit multiple issues, let me know if they should be filed separately.Dependencies not known to Cargo
The "extern prelude" is one way to fix this, but another is to is a crate-local path
crate::proc_macro::TokenStream
to the name that is introduced byextern crate
.This feature is also missing a tracking issue, the error message points to the implementation PR: #54658 (comment)
Ambiguous imports
Migrating generated code
cargo fix
did fix similar cases in "normal" source files, but generated code needs to be fixed in the code generator.These were the remaining ones after I’d already taken care of the absolute paths.
New warnings
Not as much of an issue than build errors, but slightly unexpected: switching editions uncovered new
unused_mut
warnings that were not present before. Maybe this is because 2018 currently implies NLL / MIR-borrowck?The text was updated successfully, but these errors were encountered: