Skip to content

Need to enforce copyability with "copy" in enum patterns  #3255

Description

@bblum

This shouldn't compile:

fn main() {
    let x = some(unsafe::exclusive(false));
    match move x {
        some(copy z) => {
            do z.with |b| { assert !*b; }
        }
        none => fail
    }
}

Related #2329

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions