mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-07 07:27:40 +00:00
14 lines
231 B
Rust
14 lines
231 B
Rust
![]() |
// 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();
|
||
|
}
|