core::hint::must_use
returns a temporary
#124493
Labels
A-lifetimes
Area: lifetime related
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Originally noticed in #124478 (comment), @GKFX identified it as a problem in
must_use
in #124478 (comment)I tried this code:
I expected to see this happen: no error, the value is a constant
Instead, this happened:
Meta
rustc 1.79 nightly 2024-04-27
The text was updated successfully, but these errors were encountered: