diff options
| author | bors <bors@rust-lang.org> | 2023-02-09 10:42:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-09 10:42:15 +0000 |
| commit | 5919f62cf6681979cb5401d3907445f14d27ec8f (patch) | |
| tree | 3c13a999562eee41ed85e413270c4e7f6a78c8ef /compiler/rustc_parse/src/parser/expr.rs | |
| parent | c40919b7a75f93ed7ef040361e82c656d246d41e (diff) | |
| parent | f2a2e298bafd113fc277ce6fc53df340f55c3cd0 (diff) | |
| download | rust-5919f62cf6681979cb5401d3907445f14d27ec8f.tar.gz rust-5919f62cf6681979cb5401d3907445f14d27ec8f.zip | |
Auto merge of #107840 - matthiaskrgr:rollup-e6v7x0a, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #107446 (Migrate some of `rustc_parse` to derive diagnostics) - #107752 (Specify dlltool prefix when generating import libs) - #107808 (bootstrap.py: fix build-failure message) - #107834 (create symlink for legacy rustfmt path) - #107835 (use idiomatic formatting) 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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index c37808f8c3d..2fc8ce98af0 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -5,6 +5,7 @@ use super::{ AttrWrapper, BlockMode, ClosureSpans, ForceCollect, Parser, PathStyle, Restrictions, SemiColonMode, SeqSep, TokenExpectType, TokenType, TrailingToken, }; + use crate::errors; use crate::maybe_recover_from_interpolated_ty_qpath; use core::mem; @@ -1017,7 +1018,7 @@ impl<'a> Parser<'a> { fn error_unexpected_after_dot(&self) { // FIXME Could factor this out into non_fatal_unexpected or something. let actual = pprust::token_to_string(&self.token); - self.struct_span_err(self.token.span, &format!("unexpected token: `{actual}`")).emit(); + self.sess.emit_err(errors::UnexpectedTokenAfterDot { span: self.token.span, actual }); } // We need an identifier or integer, but the next token is a float. |
