]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/const-generics/hash-tyvid-regression-2.rs
Rollup merge of #98998 - workingjubilee:naked-means-no-clothes-enforcement-technology...
[rust.git] / src / test / incremental / const-generics / hash-tyvid-regression-2.rs
1 // revisions: cfail
2 #![feature(generic_const_exprs, adt_const_params)]
3 #![allow(incomplete_features)]
4 // regression test for #77650
5 struct C<T, const N: core::num::NonZeroUsize>([T; N.get()])
6 where
7     [T; N.get()]: Sized;
8 impl<'a, const N: core::num::NonZeroUsize, A, B: PartialEq<A>> PartialEq<&'a [A]> for C<B, N>
9 where
10     [B; N.get()]: Sized,
11 {
12     fn eq(&self, other: &&'a [A]) -> bool {
13         self.0 == other
14         //~^ error: can't compare
15     }
16 }
17
18 fn main() {}