Skip to content
Permalink
Browse files

Add test for const generics struct constructor

  • Loading branch information...
varkor committed Jun 6, 2019
1 parent a0e3e9a commit 647b4a4deb8de06cdc375187ecaf29ebeaa65f98
@@ -0,0 +1,15 @@
// run-pass

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

struct ArrayStruct<T, const N: usize> {
data: [T; N],
}

struct ArrayTuple<T, const N: usize>([T; N]);

fn main() {
let _ = ArrayStruct { data: [0u32; 8] };
let _ = ArrayTuple([0u32; 8]);
}
@@ -0,0 +1,6 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/array-wrapper-struct-ctor.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^

0 comments on commit 647b4a4

Please sign in to comment.
You can’t perform that action at this time.