Repository navigation
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
I'm seeing an internal compiler error on the following input (found by fuzz-rustc):
$ echo "enum e{A((?'a a+?+l))}" > main.rs
$ rustc main.rs
error: `?` may only modify trait bounds, not lifetime bounds
--> main.rs:1:11
|
1 | enum e{A((?'a a+?+l))}
| ^
error: expected one of `)`, `+`, or `,`, found `a`
--> main.rs:1:15
|
1 | enum e{A((?'a a+?+l))}
| ^ expected one of `)`, `+`, or `,`
error: internal compiler error: unexpected lifetime bound
--> main.rs:1:11
|
1 | enum e{A((?'a a+?+l))}
| ^^^
thread 'rustc' panicked at 'Box<Any>', <::std::macros::panic macros>:2:4
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.43.0-nightly (58b834344 2020-02-05) running on x86_64-unknown-linux-gnu
error: aborting due to 3 previous errors
The error happens on nightly and beta but not on stable.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
pnkfelix commentedon Feb 6, 2020
triage : P-medium, removing nomination, adding needs-bisect.
pnkfelix commentedon Feb 6, 2020
(the bisection here would be entirely automatable if rust-lang/cargo-bisect-rustc#34 were addressed.)
JohnTitor commentedon Feb 6, 2020
Bisected roughly: ICE occurred from #67505 but not panicked, panicked from #68034
dwrensha commentedon Feb 8, 2020
#67148 in particular looks suspicious.
cc @Centril
dwrensha commentedon Feb 9, 2020
Pre-#67148, we return early with an error here:
rust/src/librustc_parse/parser/ty.rs
Line 82 in c64eecf
Post-#67148, in the corresponding code happens in a call to
parse_paren_comma_sep:rust/src/librustc_parse/parser/ty.rs
Lines 197 to 201 in 1ad6b5e
and the parser "recovers" from the error encountered in
p.parse_ty()?, allowing this line to be reached:rust/src/librustc_parse/parser/ty.rs
Line 217 in 1ad6b5e
dwrensha commentedon Feb 10, 2020
I opened #69014, which takes the stance that
span_bug()is no longer appropriate here.It's possible that there's a better fix that changes the way
parse_paren_comma_seq()works, but that would require a deeper expertise of how these things are supposed to work than I currently have.Rollup merge of rust-lang#69014 - dwrensha:fix-68890, r=Centril