blob: c9652b1c83385a9951d610b855326394c39211db [file]
#![feature(
adt_const_params,
gca_adts,
gca_macroless_args,
gca_min_const_items,
unsized_const_params
)]
trait Trait {
#[rustc_always_gca]
const ASSOC: usize;
}
fn takes_tuple<const A: (u32, u32)>() {}
fn takes_nested_tuple<const A: (u32, (u32, u32))>() {}
fn generic_caller<T: Trait, const N: usize, const N2: u32>() {
takes_tuple::<{ (N, N2) }>();
//~^ ERROR the constant `N` is not of type `u32`
takes_tuple::<{ (N, T::ASSOC) }>();
//~^ ERROR the constant `N` is not of type `u32`
//~| ERROR the constant `<T as Trait>::ASSOC` is not of type `u32`
takes_nested_tuple::<{ (N, (N, N2)) }>();
//~^ ERROR the constant `N` is not of type `u32`
takes_nested_tuple::<{ (N, (N, T::ASSOC)) }>();
//~^ ERROR the constant `N` is not of type `u32`
//~| ERROR the constant `<T as Trait>::ASSOC` is not of type `u32`
}
fn main() {}