Skip to content

Commit

Permalink
Add a test for unused const parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Apr 17, 2019
1 parent 15033a9 commit 318a10e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/unused-const-param.rs
@@ -0,0 +1,8 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

struct A<const N: usize>; // ok

fn main() {}
6 changes: 6 additions & 0 deletions src/test/ui/const-generics/unused-const-param.stderr
@@ -0,0 +1,6 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/unused-const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^

0 comments on commit 318a10e

Please sign in to comment.