-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: {type error}
#120253
Labels
C-bug
Category: This is a bug.
F-impl_trait_in_assoc_type
`#![feature(impl_trait_in_assoc_type)]`
I-cycle
Issue: A query cycle occurred while none was expected
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Jan 22, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jan 22, 2024
fmease
added
F-impl_trait_in_assoc_type
`#![feature(impl_trait_in_assoc_type)]`
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jan 23, 2024
auto-reduced (treereduce-rust): type Foo = impl std::fmt::Debug;
struct Bar(Foo);
fn define() -> Bar {
Bar(42)
}
original: // check-pass
#![feature(type_alias_impl_trait)]
use std::fmt::Debug;
type Foo = impl std::fmt::Debug;
struct Bar(Foo);
fn define() -> Bar {
Bar(42)
}
type Foo2 = impl Debug;
fn define2(_: Foo2) {
let PhantomPinned = || -> Ptr { 42 };
}
type Foo3 = impl Debug;
fn define3(x: Foo3) {
let y: i32 = x;
}
fn define3_1(_: Foo3) {
define3(42)
}
type Foo4 = impl Debug;
fn define4(_: Foo4) {
let y: Foo4 = 42;
}
fn main() {} Version information
Command: Program output
|
This ices since #120137 by @compiler-errors but I dont see any of the added error messages which is weird |
ICE happens before any of those error messages would be fired. I'll fix it later. |
fmease
added a commit
to fmease/rust
that referenced
this issue
Jan 24, 2024
…alidating, r=oli-obk Normalize field types before checking validity I forgot to normalize field types when checking ADT-like aggregates in the MIR validator. This normalization is needed due to a crude check for opaque types in `mir_assign_valid_types` which prevents opaque type cycles -- if we pass in an unnormalized type, we may not detect that the destination type is an opaque, and therefore will call `type_of(opaque)` later on, which causes a cycle error -> ICE. Fixes rust-lang#120253
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 27, 2024
Rollup merge of rust-lang#120277 - compiler-errors:normalize-before-validating, r=oli-obk Normalize field types before checking validity I forgot to normalize field types when checking ADT-like aggregates in the MIR validator. This normalization is needed due to a crude check for opaque types in `mir_assign_valid_types` which prevents opaque type cycles -- if we pass in an unnormalized type, we may not detect that the destination type is an opaque, and therefore will call `type_of(opaque)` later on, which causes a cycle error -> ICE. Fixes rust-lang#120253
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-impl_trait_in_assoc_type
`#![feature(impl_trait_in_assoc_type)]`
I-cycle
Issue: A query cycle occurred while none was expected
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zvalidate-mir
Program output
The text was updated successfully, but these errors were encountered: