diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 14:00:16 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 10:04:49 +1100 |
| commit | 541d7cc65c56402f31335e41075838c0da5fbe01 (patch) | |
| tree | 4dcf1c44019f4bb235268ec7f45b38cc15617c43 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 7a294e998b66ea6d410a6840cba80347fc4764c2 (diff) | |
| download | rust-541d7cc65c56402f31335e41075838c0da5fbe01.tar.gz rust-541d7cc65c56402f31335e41075838c0da5fbe01.zip | |
Rename `AddToDiagnostic` as `Subdiagnostic`.
To match `derive(Subdiagnostic)`.
Also rename `add_to_diagnostic{,_with}` as `add_to_diag{,_with}`.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |
