Skip to content

Internal compiler error: cannot relate bound region. #14182

Closed
@ghost

Description

The following minimal program reproducing the bug (in which I'm doing something terribly wrong I guess(?)):

fn main() {
    let mut x: Vec< <'a> ||:'a> = Vec::new();
    x.push(|| {});
}

outputs the following error on when simply compiling on Windows 7 (64 bits, using the 32-bits binaries on the website to compile) with rustc minimal.rs:

minimal.rs:3:9: 3:14 error: internal compiler error: cannot relate bound region: ReLateBound(11, BrNamed(syntax::ast::DefId{krate: 0u32, node: 13u32}, a)) <= ReInfer(7)
minimal.rs:3    x.push(|| {});
                       ^~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', C:\bot\slave\nightly-win\build\src\libsyntax\diagnostic.rs:99

rustc -v output:

rustc 0.11-pre-nightly (ab369c4 2014-05-09 00:51:35 -0700)
host: i686-pc-mingw32

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-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