-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE: broken mir: Unsize coercion, but &Foo<[impl Sized; 2]>
isn't coercible to &Foo<[i32]>
#130921
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
another one from #116684 #![feature(type_alias_impl_trait)]
fn rpit() -> impl Sized {}
pub type Tait = impl Sized;
pub fn foo() -> Box<dyn std::future::Future<Output = Tait>> {
Box::new(async {
let _out: Tait = rpit();
_out
})
}
`` |
another one that is a bit smaller than the original example: fn hello() -> [impl Sized; 2] {
if false {
let x = hello();
let _: &[i32] = &x;
}
todo!()
} |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 10, 2024
…stebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this issue
Oct 10, 2024
…stebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 16, 2024
…stebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
Urgau
added a commit
to Urgau/rust
that referenced
this issue
Oct 16, 2024
…stebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 16, 2024
Rollup merge of rust-lang#130989 - compiler-errors:unsize-opaque, r=estebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
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: