Skip to content

Internal compiler error: cannot relate bound region. #14182

New issue

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

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

Already on GitHub? # to your account

Closed
ghost opened this issue May 13, 2014 · 1 comment · Fixed by #19780
Closed

Internal compiler error: cannot relate bound region. #14182

ghost opened this issue May 13, 2014 · 1 comment · Fixed by #19780
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ghost
Copy link

ghost commented May 13, 2014

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
@tomjakubowski
Copy link
Contributor

Hit this myself with:

struct Foo {
    f: <'b> |&'b int|: 'b -> &'b int
}

pub fn main() {
    let foo = Foo {
        f: |x| x
    };
}

@ghost ghost added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Nov 19, 2014
bors added a commit that referenced this issue Dec 18, 2014
Closes #5988.
Closes #10176.
Closes #10456.
Closes #12744.
Closes #13264.
Closes #13324.
Closes #14182.
Closes #15381.
Closes #15444.
Closes #15480.
Closes #15756.
Closes #16822.
Closes #16966.
Closes #17351.
Closes #17503.
Closes #17545.
Closes #17771.
Closes #17816.
Closes #17897.
Closes #17905.
Closes #18188.
Closes #18232.
Closes #18345.
Closes #18389.
Closes #18400.
Closes #18502.
Closes #18611.
Closes #18783.
Closes #19009.
Closes #19081.
Closes #19098.
Closes #19127.
Closes #19135.
lnicola pushed a commit to lnicola/rust that referenced this issue Mar 13, 2023
minor: Remove file added by mistake

This got added somehow in rust-lang/rust-analyzer#14154.
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 3, 2025
`warn_on_all_wildcard_imports` should warn on all wildcard imports,
including the reexported ones.

Fix rust-lang#13660

changelog: [`warn_on_all_wildcard_imports`]: when asked to warn on all
wildcard imports, include the reexported ones
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants