Skip to content

Idea: subpatterns and non-trivial patterns affect lifetimes #43

Closed
@QuineDot

Description

@QuineDot

See this issue.

Fails:

fn f(mut x: &String) {
    x = &String::new();
}

Compiles:

fn f(mut x @ _: &String) {
    x = &String::new();
}

fn f((mut x,): (&String,)) {
    x = &String::new();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions