rust/tests/ui/parser/deep-unmatched-angle-brackets.stderr
Esteban Küber 2dec1bc685 Avoid unbounded O(n^2) when parsing nested type args
When encountering code like `f::<f::<f::<f::<f::<f::<f::<f::<...` with
unmatched closing angle brackets, add a linear check that avoids the
exponential behavior of the parse recovery mechanism.

Fix #117080.
2023-10-25 19:07:34 +00:00

14 lines
551 B
Plaintext

error: expected one of `!`, `+`, `,`, `::`, or `>`, found `(`
--> $DIR/deep-unmatched-angle-brackets.rs:14:63
|
LL | <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>();
| ^ expected one of `!`, `+`, `,`, `::`, or `>`
|
help: you might have meant to end the type parameters here
|
LL | <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>>();
| +
error: aborting due to previous error