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

Obscure compiler panic with async/await #56651

Closed
rosehuds opened this issue Dec 9, 2018 · 4 comments
Closed

Obscure compiler panic with async/await #56651

rosehuds opened this issue Dec 9, 2018 · 4 comments

Comments

@rosehuds
Copy link

@rosehuds rosehuds commented Dec 9, 2018

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`.
@jonas-schievink
Copy link
Member

@jonas-schievink jonas-schievink commented Dec 13, 2018

possibly a duplicate of #53989

@lqd
Copy link
Member

@lqd lqd commented Feb 22, 2019

Note: apart from needing an update of futures-preview to alpha.13, this issue's code also depends on the tokio async-await-preview feature which currently doesn't build on nightly anymore (until at least tokio-rs/tokio#919 or similar is merged)

@lqd
Copy link
Member

@lqd lqd commented Feb 26, 2019

Now that a new tokio-async-await has been released, I've retested the acacia repo on the latest nightly and it builds correctly: this ICE looks fixed (like a few other ones I've retested recently).

@jonas-schievink
Copy link
Member

@jonas-schievink jonas-schievink commented Feb 26, 2019

I'll close this in favor of #57084 then, which contains a small playground example that would make a nice test case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants