add test that repeating non-Copy constants works
This commit is contained in:
parent
54a3ed3114
commit
f8d4883dbe
@ -0,0 +1,13 @@
|
||||
// check-pass
|
||||
|
||||
// Repeating a *constant* of non-Copy type (not just a constant expression) is already stable.
|
||||
|
||||
const EMPTY: Vec<i32> = Vec::new();
|
||||
|
||||
pub fn bar() -> [Vec<i32>; 2] {
|
||||
[EMPTY; 2]
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let x = bar();
|
||||
}
|
Loading…
Reference in New Issue
Block a user