]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/too_generic_eval_ice.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / consts / too_generic_eval_ice.rs
1 pub struct Foo<A, B>(A, B);
2
3 impl<A, B> Foo<A, B> {
4     const HOST_SIZE: usize = std::mem::size_of::<B>();
5
6     pub fn crash() -> bool {
7         [5; Self::HOST_SIZE] == [6; 0]
8         //~^ ERROR constant expression depends on a generic parameter
9         //~| ERROR constant expression depends on a generic parameter
10         //~| ERROR can't compare `[{integer}; _]` with `[{integer}; 0]`
11     }
12 }
13
14 fn main() {}