about summary refs log tree commit diff
path: root/src/test/ui/const-generics/auxiliary/const_generic_lib.rs
blob: 8d4cd9c0d6b7c9f40e5c6caa729fee5659590226 (plain)
1
2
3
4
5
6
7
8
9
10
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

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

pub type Alias = Struct<2>;

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