Closed
Description
Pretty sure there is something wrong with my code, but Rust doesn't give any meaningful error message, just fails and requests to report this here.
Code + Error message:
$ cat rust_bug.rs
struct Parser<'self, A> (&'self fn(&str) -> Option<(A, uint)>);
fn char<'self>(c: u8) -> Parser<'self, u8> {
Parser(|string|
if string[0] == c {
Some((c, 1))
} else {
None
})
}
fn main() {
}
$ rust run rust_bug.rs
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 to get further details and report the results to github.com/mozilla/rust/issues
$ RUST_LOG=rustc=1 rust run rust_bug.rs
task <unnamed> failed at 'assertion failed: rp.is_none()', /Users/utkarsh/dev/git/rust/src/librustc/middle/typeck/collect.rs:1108
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 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', /Users/utkarsh/dev/git/rust/src/librustc/rustc.rs:376
I'm using the HEAD of master branch as of this moment: 89d0400.
Metadata
Metadata
Assignees
Labels
No labels