Skip to content

Segmentation fault in match. #5999

Closed
Closed
@alexbers

Description

@alexbers

This code:

enum Command {
    Create{qname:~str},
    Help,
    Unknown,
}

fn main() {
    let val = Unknown;

    match val{
        Create{qname: qname} => {
            print(fmt!("Create %?", qname));
        }
        Help => {
            print(~"Help");
        }
        _ => {
            print(~"Other");
        }
    }
}

Gives segmentation fault in runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions