Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ozten opened this issue Jul 23, 2013 · 4 comments
Closed

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

ozten opened this issue Jul 23, 2013 · 4 comments
Labels
A-lifetimes Area: Lifetimes / regions I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ozten
Copy link
Contributor

ozten commented Jul 23, 2013

$ 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 <") }
    }
}
@ozten
Copy link
Contributor Author

ozten commented Jul 23, 2013

$ rustc --version rustc 0.8-pre (d582eeb 2013-07-12 21:40:36 -0700) host: x86_64-apple-darwin

@huonw
Copy link
Member

huonw commented Jul 23, 2013

Same error message as #6396, #7400 and #7741. (The examples are sufficiently different that I'm unwilling to close as a duplicate without further investigation.)

For reference, this should work with:

fn parse<'a>(header: &'a str) -> &'a str {
    ...
}

@pnkfelix
Copy link
Member

pnkfelix commented Oct 2, 2013

probable subbug of #4846

@alexcrichton
Copy link
Member

Closed by #10153, relevant tests already appear to be checked in.

flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 23, 2021
…ponents, r=flip1995

Add missing components to rust-toolchain file

Somehow these basic components are missing from the toolchain file...

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants