1
Fork 0

Rollup merge of #102286 - compiler-errors:recover-semi-in-block-item, r=davidtwco

Recover some items that expect braces and don't take semicolons

Fixes #102262
This commit is contained in:
Matthias Krüger 2022-09-26 19:19:21 +02:00 committed by GitHub
commit 6f5e8c2ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 11 deletions

View file

@ -745,6 +745,14 @@ pub(crate) struct UseEqInstead {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(parser::use_empty_block_not_semi)]
pub(crate) struct UseEmptyBlockNotSemi {
#[primary_span]
#[suggestion_hidden(applicability = "machine-applicable", code = "{{}}")]
pub span: Span,
}
// SnapshotParser is used to create a snapshot of the parser
// without causing duplicate errors being emitted when the `Parser`
// is dropped.