Skip to content

Commit c2a1dfa

Browse files
committed
Add regression test for issue 73899
Adds regression test for #73899
1 parent 675f114 commit c2a1dfa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/test/ui/issues/issue-73899.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// run-pass
2+
#![feature(const_evaluatable_checked)]
3+
#![feature(const_generics)]
4+
#![allow(incomplete_features)]
5+
6+
trait Foo {}
7+
8+
impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {}
9+
10+
trait FooImpl<const IS_ZERO: bool> {}
11+
12+
impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {}
13+
14+
impl<const N: usize> FooImpl<{ 0u8 != 0u8 }> for [(); N] {}
15+
16+
fn foo<T: Foo>(_v: T) {}
17+
18+
fn main() {
19+
foo([]);
20+
foo([()]);
21+
}

0 commit comments

Comments
 (0)