Closed
Description
openedon Sep 11, 2013
I'm running rust 0.7-1, the following program:
use std::hashmap::{HashMap, Map};
fn do_something<'input, M: Map<int, &'self str>> (key: int, map: &'input M){
match map.find(key){
Some(result) => println(fmt!("%s", result)),
None => println("no match")
};
}
fn main(){
let map : HashMap<int, &str> = HashMap::new();
map.insert(1, "one");
do_something(1, map);
}
Causes rustc
to fail with the following message
rust: task failed at 'assertion failed: rp.is_none()', /build/rust/src/rust-0.7/src/librustc/middle/typeck/collect.rs:1040
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /build/rust/src/rust-0.7/src/librustc/rustc.rs:354
rust: domain main @0x1552d70 root task failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels