Skip to content

Segfault with hashmap, boxes and pattern matching #4904

Closed
@brson

Description

@brson

This segfaults.

extern mod std;

use std::oldmap::HashMap;

fn main() {
    let wait_map = HashMap::<int, @mut ~[int]>();
    match wait_map.find(&1) {
        Some(@ref mut waiters) => { }
        None => ()
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-lifetimesArea: Lifetimes / regionsI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions