blob: 4607f3e99b51fd122aacfcb4390435215c10f991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![feature(lazy_normalization_consts)]
//~^ WARN the feature `lazy_normalization_consts` is incomplete
trait ArraySizeTrait {
const SIZE: usize = 0;
}
impl<T: ?Sized> ArraySizeTrait for T {
const SIZE: usize = 1;
}
struct SomeArray<T: ArraySizeTrait> {
array: [u8; T::SIZE],
//~^ ERROR constant expression depends on a generic parameter
phantom: std::marker::PhantomData<T>,
}
fn main() {}
|