2024 No migration for tail expression temporary drop #132814
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-edition-2024
Area: The 2024 edition
C-bug
Category: This is a bug.
D-edition
Diagnostics: An error or lint that should account for edition differences.
L-tail_expr_drop_order
Lint: tail_expr_drop_order
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: Warning about the temporary being dropped too early. Or...I'm not fully understanding RFC 3606, and can't explain to myself why the temporary is not extended to the statement.
Instead, this happened: No warning, and this fails on 2024 with:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: