Skip to content

Assignee expressions can contain call expressions (tuple structs) #2209

@theemathas

Description

@theemathas

See also #2208 for more on assignee expressions.

The following code compiles:

struct Thing(i32, i32);

fn main() {
    let x;
    Thing(x, *&mut 0) = Thing(1, 2);
}

This means that the tuple struct syntax can be used in assignee expressions.

However, in expressions, the tuple struct syntax seems to be parsed as a call expression. And call expressions aren't listed as a legal assignee expression. Thus, the compiler and the reference disagree with each other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions