Skip to content

Commit 91889fc

Browse files
authored
Rollup merge of #81927 - vandenheuvel:issue_32498, r=Mark-Simulacrum
Add a regression test for #32498 [This](#32498 (comment)) test mentioned at issue #32498 now passes. This PR adds this regression test.
2 parents 4e888bf + b29d716 commit 91889fc

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)