summary refs log tree commit diff
path: root/src/test/ui/const-generics/auxiliary/const_generic_lib.rs
blob: 901fb5dd054e2f6f28853b73c96a6066e37ebf23 (plain)
1
2
3
4
5
6
7
8
9
#![feature(const_generics)]

pub struct Struct<const N: usize>(pub [u8; N]);

pub type Alias = Struct<2>;

pub fn function(value: Struct<3>) -> u8 {
    value.0[0]
}