3 // Closures include captured types twice in a type tree.
5 // Wrapping one closure with another leads to doubling
6 // the amount of types in the type tree.
8 // This test ensures that rust can handle
9 // deeply nested type trees with a lot
10 // of duplicated subtrees.
12 fn dup(f: impl Fn(i32) -> i32) -> impl Fn(i32) -> i32 {
43 // Compiler dies around here if it tries
44 // to walk the tree exhaustively.
58 println!("Type size was at least {}", f(1));