]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/issue-32498.rs
Rollup merge of #106927 - Ezrashaw:e0606-make-machine-applicable, r=estebank
[rust.git] / tests / ui / generics / issue-32498.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 // Making sure that no overflow occurs.
5
6 struct L<T> {
7     n: Option<T>,
8 }
9 type L8<T> = L<L<L<L<L<L<L<L<T>>>>>>>>;
10 type L64<T> = L8<L8<L8<L8<T>>>>;
11
12 fn main() {
13     use std::mem::size_of;
14     assert_eq!(size_of::<L64<L64<()>>>(), 1);
15     assert_eq!(size_of::<L<L64<L64<()>>>>(), 1);
16 }