Add regression test for #62579

This commit is contained in:
varkor 2019-10-23 17:09:56 +01:00
parent 51c687446d
commit cc7294c751
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,15 @@
// run-pass
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
#[derive(PartialEq, Eq)]
struct NoMatch;
fn foo<const T: NoMatch>() -> bool {
true
}
fn main() {
foo::<{NoMatch}>();
}

View file

@ -0,0 +1,8 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/issue-62579-no-match.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default