We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 921ec4b commit b29d716Copy full SHA for b29d716
src/test/ui/generics/issue-32498.rs
@@ -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