Add tests

This commit is contained in:
varkor
2019-05-03 14:42:38 +01:00
parent 823293bf16
commit 47f373128a
4 changed files with 29 additions and 0 deletions
@@ -0,0 +1,3 @@
trait Trait<const T: ()> {} //~ ERROR const generics are unstable
fn main() {}
@@ -0,0 +1,12 @@
error[E0658]: const generics are unstable
--> $DIR/const-param-in-trait-ungated.rs:1:19
|
LL | trait Trait<const T: ()> {}
| ^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/44580
= help: add #![feature(const_generics)] to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
@@ -0,0 +1,8 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
trait Trait<const T: ()> {}
fn main() {}
@@ -0,0 +1,6 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/const-param-in-trait.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^