rust/tests/ui/const-generics/defaults/complex-unord-param.rs
2024-02-16 20:02:50 +00:00

18 lines
359 B
Rust

//@ run-pass
// Checks a complicated usage of unordered params
#![allow(dead_code)]
struct NestedArrays<'a, const N: usize, A: 'a, const M: usize, T:'a =u32> {
args: &'a [&'a [T; M]; N],
specifier: A,
}
fn main() {
let array = [1, 2, 3];
let nest = [&array];
let _ = NestedArrays {
args: &nest,
specifier: true,
};
}