mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
17 lines
284 B
Rust
17 lines
284 B
Rust
//@ check-pass
|
|
|
|
const SZ: usize = 64_000_000;
|
|
type BigDrop = [String; SZ];
|
|
|
|
fn f(_dropme: BigDrop) {}
|
|
|
|
fn f2(_moveme: BigDrop) -> String {
|
|
let [a, ..] = _moveme;
|
|
a
|
|
}
|
|
|
|
fn main() {
|
|
f(std::array::from_fn(|_| String::new()));
|
|
f2(std::array::from_fn(|_| String::new()));
|
|
}
|