-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: invalid immediate for given destination place: scalar value has wrong size
#131406
Comments
Ah wait, that missing item is fine, it has a default. The actual problem is here: fn take0<const N: u64>(_: impl Owner<C<N> = { N }>) {}
|
An example which only contains a type checking error: #![feature(associated_const_equality, generic_const_items)]
#![allow(incomplete_features)]
trait Trait {
const C<const N: u32>: u32;
}
impl Trait for () {
const C<const N: u32>: u32 = N;
}
fn ice<const N: u64, T: Trait<C<N> = { N }>>(_: T) {}
fn main() {
ice::<128, _>(());
} |
When we type check |
…try> Ensure constants are WF before calling into CTFE Fixes rust-lang#127643 Fixes rust-lang#131046 Fixes rust-lang#131406 Fixes rust-lang#133066 I'll write a PR desc for this tommorow r? `@ghost`
…try> Ensure constants are WF before calling into CTFE Fixes rust-lang#127643 Fixes rust-lang#131046 Fixes rust-lang#131406 Fixes rust-lang#133066 I'll write a PR desc for this tommorow r? `@ghost`
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: