Closed
Description
$ RUST_LOG=rustc=1,::rt::backtrace rustc link_header.rs
rust: task failed at 'assertion failed: rp.is_none()', /Users/shout/Projects/rust/src/librustc/middle/typeck/collect.rs:1044
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', /Users/shout/Projects/rust/src/librustc/rustc.rs:358
rust: domain main @0x7f86ba819810 root task failed
Complete contents of link_header.rs
#[ crate_type = "lib" ];
// Given a Link header, parse out the next url
// <https://api.github.com/repositories?since=364>; rel="next", <https://api.github.com/repositories{?since}>; rel="first"
fn parse(header: ~str) -> &'self str {
match header.find('<') {
Some(start) => {
match header.find('>') {
Some(end) => {
return header.slice(start + 1, end);
},
_ => { fail!("Missing >") }
}
},
_ => {fail!("Missing <") }
}
}