Skip to content

Commit

Permalink
Add regression test for #61422
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Jun 2, 2019
1 parent 5a2410a commit e82cd95
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/ui/const-generics/issue-61422.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

use std::mem;

fn foo<const SIZE: usize>() {
let arr: [u8; SIZE] = unsafe {
let mut array: [u8; SIZE] = mem::uninitialized();
array
};
}

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

0 comments on commit e82cd95

Please sign in to comment.