2017-06-22 19:13:09 +00:00
|
|
|
// Check that non constant exprs fail for array repeat syntax
|
2013-03-06 13:34:44 -08:00
|
|
|
|
|
|
|
fn main() {
|
2015-01-08 22:02:42 +11:00
|
|
|
fn bar(n: usize) {
|
2015-03-30 01:23:15 +02:00
|
|
|
let _x = [0; n];
|
2016-12-21 12:32:59 +02:00
|
|
|
//~^ ERROR attempt to use a non-constant value in a constant [E0435]
|
2013-03-06 13:34:44 -08:00
|
|
|
}
|
|
|
|
}
|