mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
2dec1bc685
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.
14 lines
551 B
Plaintext
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
|
|
|