missing rust_2021_incompatible_closure_captures with manual drop and move closure #88476
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2021
Area: The 2021 edition
C-bug
Category: This is a bug.
I tried this code:
This does not issue a warning for
rust_2021_incompatible_closure_captures
, however it fails to compile withcapture_disjoint_fields
enabled:I would expect
rust_2021_incompatible_closure_captures
to give a suggestion to addlet _ = &f
.Found in the 2021 crater run for:
I'm uncertain if this is a duplicate of #88444 or #88114, they seem very similar, but this case is specific to implementing Drop.
Meta
rustc --version --verbose
:cc @rust-lang/wg-rfc-2229
The text was updated successfully, but these errors were encountered: