remove duplicate tests

This commit is contained in:
Bastian Kauschke 2020-06-30 20:19:31 +02:00
parent a1528c432e
commit 0889d79050
2 changed files with 0 additions and 38 deletions

View file

@ -1,19 +0,0 @@
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete
trait Foo {}
impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {}
//~^ ERROR constant expression depends on a generic parameter
trait FooImpl<const IS_ZERO: bool> {}
impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {}
impl<const N: usize> FooImpl<{ 0u8 != 0u8 }> for [(); N] {}
fn foo<T: Foo>(_: T) {}
fn main() {
foo([]);
foo([()]);
}

View file

@ -1,19 +0,0 @@
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-71922.rs:1:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error: constant expression depends on a generic parameter
--> $DIR/issue-71922.rs:5:50
|
LL | impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {}
| ^^^^^^^^^^^^^^^^^^^
|
= note: this may fail depending on what value the parameter takes
error: aborting due to previous error; 1 warning emitted