summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/min_const_generics/type_and_const_defaults.rs
blob: fa119c59f613e4e3a425235c478dcad5437e4d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// run-pass
#![allow(dead_code)]

struct Both<T=u32, const N: usize=3> {
  arr: [T; N]
}

trait BothTrait<T=u32, const N: usize=3> {}

enum BothEnum<T=u32, const N: usize=3> {
  Dummy([T; N])
}

struct OppOrder<const N: usize=3, T=u32> {
  arr: [T; N]
}

fn main() {
  let _ = OppOrder::<3, u32> {
    arr: [0,0,0],
  };
  let _ = Both::<u8, 1> {
    arr: [0],
  };
}