Skip to content

is a scrutinee always a place expression? #1164

Open
@steveklabnik

Description

@steveklabnik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language CleanupImprovements to existing language which is correct but not clear, or missing examples, or the like.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions