Skip to content

Obscure compiler panic with async/await #56651

@rosefromthedead

Description

@rosefromthedead

My code can be found here. While building, the compiler panics with
src/librustc/infer/region_constraints/mod.rs:683: cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(2)) <= '_#0r

I would give a short extract of the code but it's hard to isolate the problem, however I can say that it arises in acacia::je_net::handle_client only when calling await!(receive_msg(socket_read)), including after annotating the type of this expression.

Full error message:

error: internal compiler error: src/librustc/infer/region_constraints/mod.rs:683: cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(2)) <= '_#0r

thread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:538:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.32.0-nightly (4a45578bc 2018-12-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `acacia`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitI-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