reference
reference copied to clipboard
is a scrutinee always a place expression?
https://doc.rust-lang.org/stable/reference/expressions/match-expr.html says:
A match behaves differently depending on whether or not the scrutinee expression is a place expression or value expression.
And a little lower,
When the scrutinee expression is a place expression,
Let's click that link. It says:
The following contexts are place expression contexts:
...
The former implies it can be either, the latter implies it is always a place expression. I suspect that the wording of the latter is the one that's wrong.
IIRC, the distinction here is that the scrutinee is a place expression context. A place context can receive either a place or value expression. Being a place expression context doesn't mean it can only take a place expression.
Ahhhh. That would make sense. I'm not sure if that means "close this bug, steve is just wrong" or if there's a way to make this distinction more obvious.
Regardless, thank you 👍