rust/tests/ui/const-generics/defaults/complex-unord-param.rs

18 lines
358 B
Rust
Raw Normal View History

2021-10-23 10:57:49 -05:00
// 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> {
2021-03-29 03:32:27 -05:00
args: &'a [&'a [T; M]; N],
specifier: A,
}
fn main() {
2021-03-29 03:32:27 -05:00
let array = [1, 2, 3];
let nest = [&array];
let _ = NestedArrays {
args: &nest,
specifier: true,
};
}