summaryrefslogtreecommitdiffstats
path: root/tests/ui/mir/issue-109004-drop-large-array.rs
blob: 5e3361cef6e364872de23a6bed0038820388a2f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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()));
}