Skip to content

Commit

Permalink
Add regression test for rust-lang#62579
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Oct 23, 2019
1 parent 51c6874 commit cc7294c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/ui/const-generics/issues/issue-62579-no-match.rs
Original file line number Diff line number Diff line change
@@ -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}>();
}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issues/issue-62579-no-match.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cc7294c

Please sign in to comment.