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
ICE: broken MIR
with nested opaque types.
#70971
Labels
A-impl-trait
Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch.
A-mir
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
F-impl_trait_in_bindings
`#![feature(impl_trait_in_bindings)]`
glacier
ICE tracked in rust-lang/glacier
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-low
Low priority
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
ICE: broken MIR
with nested opaque types.
It seems this ICE occurs not only in "well-nested" opaque types. #![allow(incomplete_features)]
#![feature(impl_trait_in_bindings)]
fn main() {
let ref _x: impl Sized = 5;
} Errors:
However if we wrote
then no ICE occurs. Road to #63065 |
I just ran into an ICE using
|
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Jul 23, 2021
…sts, r=oli-obk Add regression tests for the impl_trait_in_bindings ICEs Closes rust-lang#54600, closes rust-lang#54840, closes rust-lang#58504, closes rust-lang#58956, closes rust-lang#70971, closes rust-lang#79099, closes rust-lang#84919, closes rust-lang#86201, closes rust-lang#86642, closes rust-lang#87295 r? `@oli-obk`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-impl-trait
Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch.
A-mir
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
C-bug
Category: This is a bug.
F-impl_trait_in_bindings
`#![feature(impl_trait_in_bindings)]`
glacier
ICE tracked in rust-lang/glacier
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
P-low
Low priority
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code produces an internal compiler error:
(playground)
I tried various other types, bounds and concrete types, all resulting in the same ICE:
(playground)
(playground)
However, when using an anonymous binding (
_
) the code always compiles:The text was updated successfully, but these errors were encountered: