Skip to content

Commit b29d716

Browse files
committed
Add a regression test for #32498
1 parent 921ec4b commit b29d716

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: src/test/ui/generics/issue-32498.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
}

0 commit comments

Comments
 (0)