Add a test for unused const parameters
This commit is contained in:
parent
15033a9ba7
commit
318a10e906
2 changed files with 14 additions and 0 deletions
8
src/test/ui/const-generics/unused-const-param.rs
Normal file
8
src/test/ui/const-generics/unused-const-param.rs
Normal file
|
@ -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
src/test/ui/const-generics/unused-const-param.stderr
Normal file
6
src/test/ui/const-generics/unused-const-param.stderr
Normal file
|
@ -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)]
|
||||||
|
| ^^^^^^^^^^^^^^
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue