]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/lazy-normalization/issue-71922.rs
New upstream version 1.45.0+dfsg1
[rustc.git] / src / test / ui / const-generics / lazy-normalization / issue-71922.rs
CommitLineData
f9f354fc
XL
1// run-pass
2#![feature(const_generics)]
3#![allow(incomplete_features)]
4trait Foo {}
5
6impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {}
7
8trait FooImpl<const IS_ZERO: bool> {}
9
10impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {}
11
12impl<const N: usize> FooImpl<{ 0u8 != 0u8 }> for [(); N] {}
13
14fn foo<T: Foo>(_: T) {}
15
16fn main() {
17 foo([]);
18 foo([()]);
19}