rust/tests/ui/generics/issue-32498.rs
David Tolnay 5bbf0a8306
Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"
This reverts commit 557359f925, reversing
changes made to 1e6c09a803.
2023-07-21 22:35:57 -07:00

17 lines
319 B
Rust

// 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);
}