-
Notifications
You must be signed in to change notification settings - Fork 13k
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: Failed to normalize Alias(Projection, AliasTy ..
#113272
Comments
Regression in nightly-2022-05-28
|
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize <() as Trait>::RefTarget, maybe try to call `try_normalize_erasing_regions` instead Fixes rust-lang#113272
Not a regression, this was always possible: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=75705348c1fa16884e7912bc00bf9f92 |
Failed to normalize Alias(Projection, AliasTy ..
The above code from the playground trait Trait {
type RefTarget;
}
impl Trait for () where Missing: Trait {}
struct Other {
data: <() as Trait>::RefTarget,
}
const fn foo() {
unsafe {
std::mem::transmute::<Option<()>, Option<&Other>>(None);
}
}
struct Foo {
bar: [(); {
foo();
42
}],
}
fn main() {} bisects to nightly-2019-07-14 looking for regression commit between 2019-07-13 and 2019-07-14 |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
Rollup merge of rust-lang#124548 - gurry:113272-ice-failed-to-normalize, r=compiler-errors Handle normalization failure in `struct_tail_erasing_lifetimes` Fixes rust-lang#113272 The ICE occurred because the struct being normalized had an error. This PR adds some defensive code to guard against that.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: