blob: 55db10bd0e4a012d8935b8702dc5a4af69d296e8 [file] [log] [blame]
//@ run-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
trait MyTrait {
type ArrayType;
const SIZE: usize;
const ARRAY: Self::ArrayType;
}
impl MyTrait for () {
type ArrayType = [u8; Self::SIZE];
const SIZE: usize = 4;
const ARRAY: [u8; Self::SIZE] = [1, 2, 3, 4];
}
fn main() {
let _ = <() as MyTrait>::ARRAY;
}