Remove a third DiagnosticBuilder::emit_without_consuming call.

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.
This commit is contained in:
Nicholas Nethercote 2024-01-05 10:55:45 +11:00
parent 3ce34f42e1
commit 1b6c8e7533

View file

@ -77,7 +77,6 @@ impl<'a> Parser<'a> {
Applicability::MachineApplicable,
);
}
err.emit_without_consuming();
return Err(err);
}
}