blob: 8b3f4b714e1bd33662001b965d3d24a2429cbc6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
pub struct Foo<A, B>(A, B);
impl<A, B> Foo<A, B> {
const HOST_SIZE: usize = std::mem::size_of::<B>();
pub fn crash() -> bool {
[5; Self::HOST_SIZE] == [6; 0]
//~^ ERROR constant expression depends on a generic parameter
//~| ERROR constant expression depends on a generic parameter
//~| ERROR can't compare `[{integer}; Self::HOST_SIZE]` with `[{integer}; 0]`
}
}
fn main() {}
|