-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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: type mismatch when copying
#120016
Labels
C-bug
Category: This is a bug.
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
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
type mismathc when copying
type mismatch when copying
This doesn't have to do with const async blocks: #![feature(type_alias_impl_trait)]
struct Bug {
V1: [(); {
type F = impl Sized;
fn concrete_use() -> F {
1i32
}
let _: F = 0u32;
1
}],
} |
related debug ice:
|
The stacktrace changed a little bit on the orignal example, relevant part:
|
still crashing: //@ edition:2018
#![feature(type_alias_impl_trait, const_async_blocks)]
struct Bug {
V1: [(); {
type F = impl std::future::Future<Output = impl Sized>;
fn concrete_use() -> F {
//~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
async {}
}
let f: F = async { 1 };
//~^ ERROR `async` blocks are not allowed in constants
1
}],
}
fn main() {} |
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-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
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 -Zcrate-attr=feature(const_async_blocks) --edition=2021
Program output
The text was updated successfully, but these errors were encountered: