Skip to content

Commit e82cd95

Browse files
committed
Add regression test for rust-lang#61422
1 parent 5a2410a commit e82cd95

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// run-pass
2+
3+
#![feature(const_generics)]
4+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5+
6+
use std::mem;
7+
8+
fn foo<const SIZE: usize>() {
9+
let arr: [u8; SIZE] = unsafe {
10+
let mut array: [u8; SIZE] = mem::uninitialized();
11+
array
12+
};
13+
}
14+
15+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/issue-61422.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+

0 commit comments

Comments
 (0)