This code takes minutes to parse:
fn main() {
0 +
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
{ let _ : A<B<C = D, x:^
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}
The output (with --error-format=short) includes:
src/main.rs:32:32: error: expected one of `!`, `(`, `,`, `>`, `?`, `for`, `~`, lifetime, or path, found `^`
src/main.rs:31:32: error: expected one of `!`, `(`, `,`, `>`, `?`, `for`, `~`, lifetime, or path, found `^`
src/main.rs:30:32: error: expected one of `!`, `(`, `,`, `>`, `?`, `for`, `~`, lifetime, or path, found `^`
...
where each error takes significantly longer to produce than the previous.
Where it's slow
According to -Z time-passes, the slow pass is parse_crate.
sample-head-103620.txt
handle_ambiguous_unbraced_const_arg and recover_const_arg repeatedly on the stack is sus.
Impact
This input is nonsense, so it's possible the only impact of the issue is slowing down fuzzing, very slightly.
Version
rustc --version --verbose:
rustc 1.66.0-nightly (bed4ad65b 2022-10-25)
binary: rustc
commit-hash: bed4ad65bf7a1cef39e3d66b3670189581b3b073
commit-date: 2022-10-25
host: x86_64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2
Regression
Regression in nightly-2020-10-28
@rustbot label +I-compiletime
This code takes minutes to parse:
The output (with
--error-format=short) includes:where each error takes significantly longer to produce than the previous.
Where it's slow
According to
-Z time-passes, the slow pass isparse_crate.sample-head-103620.txt
handle_ambiguous_unbraced_const_argandrecover_const_argrepeatedly on the stack is sus.Impact
This input is nonsense, so it's possible the only impact of the issue is slowing down fuzzing, very slightly.
Version
rustc --version --verbose:Regression
Regression in nightly-2020-10-28
@rustbot label +I-compiletime