Mention editions when emitting 2015 exclusive errors #61914
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
A-edition-2018
Area: The 2018 edition
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-epoch
Working group: Epoch (2018) management
The difference between edition defaults for new projects between
cargo
andrustc
can lead to confusion, particularly for newcomers. All errors that would only happen on one edition should mention the discrepancy. We made an effort to have lints for 2015 to 2018 migration, but we were more lax on clarifying diagnostics when following 2018 guides whenrustc
is ran under 2015. Things like nll discrepancies (seen in #61855, moot point once we enable nll in 2015) come to mind, while things likelet async = 6;
(pass in 2015, "error: expected pattern, found reserved keywordasync
" without any mention of editions in 2018) which do not mention editions at all (it should recommend usingr#raw_idents
always, explain it was accepted in 2015 edition but it's being run in 2018).The text was updated successfully, but these errors were encountered: