We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 70a839f + c2a1dfa commit 749fe40Copy full SHA for 749fe40
src/test/ui/issues/issue-73899.rs
@@ -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