rust/tests/ui/mir/issue-109004-drop-large-array.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
283 B
Rust
Raw Normal View History

2023-03-17 07:26:04 -05:00
// 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()));
}