about summary refs log tree commit diff
path: root/tests/ui/generics/issue-32498.rs
blob: b7685ac733605941cee190e860fe7bb171925a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-pass
#![allow(dead_code)]

// Making sure that no overflow occurs.

struct L<T> {
    n: Option<T>,
}
type L8<T> = L<L<L<L<L<L<L<L<T>>>>>>>>;
type L64<T> = L8<L8<L8<L8<T>>>>;

fn main() {
    use std::mem::size_of;
    assert_eq!(size_of::<L64<L64<()>>>(), 1);
    assert_eq!(size_of::<L<L64<L64<()>>>>(), 1);
}