rust-2021-incompatible-closure-captures
fires in 2021 edition code
#101284
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2021
Area: The 2021 edition
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
D-edition
Diagnostics: An error or lint that should account for edition differences.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=92d18abb330e3fbc8a1425f3458830da
The current output is:
Ideally the output should look like:
The code is already being compiled for the 2021 edition, there's no need to issue any warnings about behaviour that was different in 2018.
The compiler should assume that the code is working as expected.
This might affect other warnings in the same category, I'm not sure.
Tested in 1.63, beta and nightly.
The text was updated successfully, but these errors were encountered: