diff --git a/src/test/ui/issues/issue-73899.rs b/src/test/ui/issues/issue-73899.rs new file mode 100644 index 0000000000000..2a3a5ab2a3bb0 --- /dev/null +++ b/src/test/ui/issues/issue-73899.rs @@ -0,0 +1,21 @@ +// run-pass +#![feature(const_evaluatable_checked)] +#![feature(const_generics)] +#![allow(incomplete_features)] + +trait Foo {} + +impl Foo for [(); N] where Self: FooImpl<{ N == 0 }> {} + +trait FooImpl {} + +impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {} + +impl FooImpl<{ 0u8 != 0u8 }> for [(); N] {} + +fn foo(_v: T) {} + +fn main() { + foo([]); + foo([()]); +}