diff options
| author | bors <bors@rust-lang.org> | 2023-04-28 06:32:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-28 06:32:01 +0000 |
| commit | 2fce2290865f012391b8f3e581c3852a248031fa (patch) | |
| tree | e28cb411ec3d66bcaeb15a1dc3e43dff84a60d5f /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 033aa092ab23ba14cdad27073c5e37ba0eddb428 (diff) | |
| parent | dda14941e0075357a1645773889689b5413518c1 (diff) | |
| download | rust-2fce2290865f012391b8f3e581c3852a248031fa.tar.gz rust-2fce2290865f012391b8f3e581c3852a248031fa.zip | |
Auto merge of #110924 - matthiaskrgr:rollup-jvznpq2, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #110766 (More core::fmt::rt cleanup.) - #110873 (Migrate trivially translatable `rustc_parse` diagnostics) - #110904 (rustdoc: rebind bound vars to type-outlives predicates) - #110913 (Add some missing built-in lints) - #110918 (`remove_dir_all`: try deleting the directory even if `FILE_LIST_DIRECTORY` access is denied) - #110920 (Fix unavailable url) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 03c82fbd329..27de9bd7268 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3151,14 +3151,10 @@ impl<'a> Parser<'a> { let label = format!("'{}", ident.name); let ident = Ident { name: Symbol::intern(&label), span: ident.span }; - self.struct_span_err(ident.span, "expected a label, found an identifier") - .span_suggestion( - ident.span, - "labels start with a tick", - label, - Applicability::MachineApplicable, - ) - .emit(); + self.sess.emit_err(errors::ExpectedLabelFoundIdent { + span: ident.span, + start: ident.span.shrink_to_lo(), + }); Label { ident } } |
