summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/complex-unord-param.rs
blob: 72967640a8e62eba02eeeb7b5046ca668cfce176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass
// Checks a complicated usage of unordered params

#![feature(const_generics)]
#![allow(incomplete_features)]
#![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,
  };
}