Skip to content

rust: task failed at 'assertion failed: rp.is_none()' #7989

Closed
@ozten

Description

@ozten
$ 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 <") }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regionsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions