Skip to content

Commit

Permalink
Remove a third DiagnosticBuilder::emit_without_consuming call.
Browse files Browse the repository at this point in the history
It's not clear why this was here, because the created error is returned
as a normal error anyway.

Nor is it clear why removing the call works. The change doesn't affect
any tests; `tests/ui/parser/issues/issue-102182-impl-trait-recover.rs`
looks like the only test that could have been affected.
  • Loading branch information
nnethercote committed Jan 8, 2024
1 parent 3ce34f4 commit 1b6c8e7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion compiler/rustc_parse/src/parser/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ impl<'a> Parser<'a> {
Applicability::MachineApplicable,
);
}
err.emit_without_consuming();
return Err(err);
}
}
Expand Down

0 comments on commit 1b6c8e7

Please sign in to comment.