rust/tests/ui/const-generics/mgca/array-expr-with-struct.rs
2026-01-10 12:45:26 +09:00

20 lines
471 B
Rust

//@ run-pass
#![feature(min_generic_const_args, adt_const_params)]
#![expect(incomplete_features)]
#![allow(dead_code)]
use std::marker::ConstParamTy;
#[derive(PartialEq, Eq, ConstParamTy)]
struct Container {
values: [u32; 3],
}
fn takes_container<const C: Container>() {}
fn generic_caller<const N: u32, const M: u32>() {
takes_container::<{ Container { values: [N, M, 1] } }>();
takes_container::<{ Container { values: [1, 2, 3] } }>();
}
fn main() {}