about summary refs log tree commit diff
path: root/src/test/compile-fail/huge-struct.rs
blob: a10c61d6606d04895e98444e871dd05d29f7b3db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// error-pattern: too big for the current

struct S32<T> {
    v0: T,
    v1: T,
    v2: T,
    v3: T,
    v4: T,
    v5: T,
    v6: T,
    v7: T,
    v8: T,
    u9: T,
    v10: T,
    v11: T,
    v12: T,
    v13: T,
    v14: T,
    v15: T,
    v16: T,
    v17: T,
    v18: T,
    v19: T,
    v20: T,
    v21: T,
    v22: T,
    v23: T,
    v24: T,
    u25: T,
    v26: T,
    v27: T,
    v28: T,
    v29: T,
    v30: T,
    v31: T,
}

struct S1k<T> { val: S32<S32<T>> }

struct S1M<T> { val: S1k<S1k<T>> }

fn main() {
    let fat: Option<S1M<S1M<S1M<u32>>>> = None;
}