-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE on "Error constructed but not emitted" #63135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The only early return I see that doesn't emit https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs#L3623 |
Applying the most obvious patch, I get the following non-ICE output: diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fb5ff7e8f9..665308eda2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3620,7 +3620,15 @@ impl<'a> Parser<'a> {
let mut etc_span = None;
while self.token != token::CloseDelim(token::Brace) {
- let attrs = self.parse_outer_attributes()?;
+ let attrs = match self.parse_outer_attributes() {
+ Ok(attrs) => attrs,
+ Err(err) => {
+ if let Some(mut delayed) = delayed_err {
+ delayed.emit();
+ }
+ return Err(err);
+ },
+ };
let lo = self.token.span;
// check that a comma comes after every field
The "expected |
@ExpHP |
I'll toss one up after I finish running the test suite. One thing: I'm not sure how to annotate the test. It looks like there's four errors that all point to EOF, but whatever I try to write, only one of them gets recognized as referring to that line.
|
…ebank Fix ICE in rust-lang#63135 Closes rust-lang#63135. r?@estebank
Rollup of 7 pull requests Successful merges: - #62663 (More questionmarks in doctests) - #62969 (Changing the structure of `mir::interpret::InterpError`) - #63153 (Remove redundant method with const variable resolution) - #63189 (Doc improvements) - #63198 (Allow trailing comma in macro 2.0 declarations.) - #63202 (Fix ICE in #63135) - #63203 (Make is_mutable use PlaceRef instead of it's fields) Failed merges: r? @ghost
Note: I only searched issues up to rust-lang/rust#63135 for appropriate tags.
I'm seeing an internal compiler error on the following input (found by fuzz-rustc):
The error happens on stable, beta, and nightly.
The text was updated successfully, but these errors were encountered: