summary refs log tree commit diff
path: root/src/test/ui/consts/too_generic_eval_ice.rs
blob: 3ea5f88f07d1e5a9137dcbc39353f99dcdcaf3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 binary operation `==` cannot be applied to type `[{integer}; _]`
    }
}

fn main() {}