blob: af494e37349146f91cb3a196a0dc5a1df5d849b0 (
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}; _]` with `[{integer}; 0]`
}
}
fn main() {}
|