]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/too_generic_eval_ice.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / 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] //~ ERROR no associated item named `HOST_SIZE`
8         //~^ the size for values of type `A` cannot be known
9         //~| the size for values of type `B` cannot be known
10     }
11 }
12
13 fn main() {}