diff options
| author | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
| commit | cd81f5b27ee00b49d413db50b5e6af871cebcf23 (patch) | |
| tree | de825c76d6714c2be261ff363eb2c840c2484578 /compiler/rustc_parse/src/parser | |
| parent | 76ee6fc926032c16a5706086922fc1125c061b70 (diff) | |
| parent | 43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c (diff) | |
| download | rust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.tar.gz rust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.zip | |
Auto merge of #122132 - nnethercote:diag-renaming3, r=nnethercote
Diagnostic renaming 3 A sequel to https://github.com/rust-lang/rust/pull/121780. r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index de088b9364b..7038b8bbe47 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -36,8 +36,8 @@ use rustc_ast::{ use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashSet; use rustc_errors::{ - pluralize, AddToDiagnostic, Applicability, Diag, DiagCtxt, ErrorGuaranteed, FatalError, PErr, - PResult, + pluralize, Applicability, Diag, DiagCtxt, ErrorGuaranteed, FatalError, PErr, PResult, + Subdiagnostic, }; use rustc_session::errors::ExprParenthesesNeeded; use rustc_span::source_map::Spanned; @@ -298,7 +298,7 @@ impl<'a> Parser<'a> { { recovered_ident = Some((ident, IdentIsRaw::Yes)); - // `Symbol::to_string()` is different from `Symbol::into_diagnostic_arg()`, + // `Symbol::to_string()` is different from `Symbol::into_diag_arg()`, // which uses `Symbol::to_ident_string()` and "helpfully" adds an implicit `r#` let ident_name = ident.name.to_string(); @@ -1271,7 +1271,7 @@ impl<'a> Parser<'a> { Ok(_) => { if self.token == token::Eq { let sugg = SuggAddMissingLetStmt { span: prev_span }; - sugg.add_to_diagnostic(err); + sugg.add_to_diag(err); } } Err(e) => { diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 7a34bc7890c..e27a5f93799 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -27,7 +27,7 @@ use rustc_ast::{Arm, BlockCheckMode, Expr, ExprKind, Label, Movability, RangeLim use rustc_ast::{ClosureBinder, MetaItemLit, StmtKind}; use rustc_ast_pretty::pprust; use rustc_data_structures::stack::ensure_sufficient_stack; -use rustc_errors::{AddToDiagnostic, Applicability, Diag, PResult, StashKey}; +use rustc_errors::{Applicability, Diag, PResult, StashKey, Subdiagnostic}; use rustc_lexer::unescape::unescape_char; use rustc_macros::Subdiagnostic; use rustc_session::errors::{report_lit_error, ExprParenthesesNeeded}; @@ -3451,8 +3451,8 @@ impl<'a> Parser<'a> { let in_if_guard = self.restrictions.contains(Restrictions::IN_IF_GUARD); let async_block_err = |e: &mut Diag<'_>, span: Span| { - errors::AsyncBlockIn2015 { span }.add_to_diagnostic(e); - errors::HelpUseLatestEdition::new().add_to_diagnostic(e); + errors::AsyncBlockIn2015 { span }.add_to_diag(e); + errors::HelpUseLatestEdition::new().add_to_diag(e); }; while self.token != token::CloseDelim(close_delim) { |
