Using syn 2.0.115, the fuzzer regurgitated the following, which timed out after around 12 seconds in release-mode and >30 seconds in debug-mode on my machine. I'm not even sure if this is of that much interest, since we can always make things worse by nesting even further than the fuzzer did. The example does demonstrate excessive resource consumption for the given input length, though, and it didn't come up in previous versions of syn; so reported anyway.
fn main() {
let _ = syn::parse_str::<syn::File>(" fn foo(self: impl foo< {; fn foo(self :[ foo;{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{; fn foo(self :[ foo;{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{{foo> {; fn foo(self :[ foo;{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{; fn foo(self :[ foo;{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{ fn foo(self :foo<{{foo> while {;}(){}}}>)}>)}>)}>)} while {;}(){}])}>)}>)}>)}>){}}])}}}>)}>)}>)}>)}])}>)}>)}>)}>)}])}>)");
}
Using
syn 2.0.115, the fuzzer regurgitated the following, which timed out after around 12 seconds in release-mode and >30 seconds in debug-mode on my machine. I'm not even sure if this is of that much interest, since we can always make things worse by nesting even further than the fuzzer did. The example does demonstrate excessive resource consumption for the given input length, though, and it didn't come up in previous versions ofsyn; so reported anyway.