diff options
| author | bors <bors@rust-lang.org> | 2024-02-28 20:39:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-28 20:39:38 +0000 |
| commit | c475e2303b551d726307c646181e0677af1e0069 (patch) | |
| tree | 1adcfeb24550451e018fe8928319a9fa68d53314 /compiler/rustc_resolve/src/diagnostics.rs | |
| parent | bf9c7a64ad222b85397573668b39e6d1ab9f4a72 (diff) | |
| parent | 8f3b007abca70140d354f19ece5745d1a2c5f2b2 (diff) | |
| download | rust-c475e2303b551d726307c646181e0677af1e0069.tar.gz rust-c475e2303b551d726307c646181e0677af1e0069.zip | |
Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco
Diagnostic renaming Renaming various diagnostic types from `Diagnostic*` to `Diag*`. Part of https://github.com/rust-lang/compiler-team/issues/722. There are more to do but this is enough for one PR. r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_resolve/src/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index eaf6dca457c..e4298a98129 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -6,8 +6,8 @@ use rustc_ast::{MetaItemKind, NestedMetaItem}; use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashSet; use rustc_errors::{ - codes::*, pluralize, report_ambiguity_error, struct_span_code_err, Applicability, DiagCtxt, - DiagnosticBuilder, ErrorGuaranteed, MultiSpan, SuggestionStyle, + codes::*, pluralize, report_ambiguity_error, struct_span_code_err, Applicability, Diag, + DiagCtxt, ErrorGuaranteed, MultiSpan, SuggestionStyle, }; use rustc_feature::BUILTIN_ATTRIBUTES; use rustc_hir::def::Namespace::{self, *}; @@ -360,7 +360,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { /// ``` fn add_suggestion_for_rename_of_use( &self, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, name: Symbol, import: Import<'_>, binding_span: Span, @@ -436,7 +436,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { /// as characters expected by span manipulations won't be present. fn add_suggestion_for_duplicate_nested_use( &self, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, import: Import<'_>, binding_span: Span, ) { @@ -566,7 +566,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { &mut self, span: Span, resolution_error: ResolutionError<'a>, - ) -> DiagnosticBuilder<'_> { + ) -> Diag<'_> { match resolution_error { ResolutionError::GenericParamsFromOuterItem(outer_res, has_generic_params, def_kind) => { use errs::GenericParamsFromOuterItemLabel as Label; @@ -1413,7 +1413,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { pub(crate) fn unresolved_macro_suggestions( &mut self, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, macro_kind: MacroKind, parent_scope: &ParentScope<'a>, ident: Ident, @@ -1529,7 +1529,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { pub(crate) fn add_typo_suggestion( &self, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, suggestion: Option<TypoSuggestion>, span: Span, ) -> bool { @@ -2475,7 +2475,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { /// Finds a cfg-ed out item inside `module` with the matching name. pub(crate) fn find_cfg_stripped( &mut self, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, segment: &Symbol, module: DefId, ) { @@ -2684,7 +2684,7 @@ pub(crate) enum DiagnosticMode { pub(crate) fn import_candidates( tcx: TyCtxt<'_>, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, // This is `None` if all placement locations are inside expansions use_placement_span: Option<Span>, candidates: &[ImportSuggestion], @@ -2710,7 +2710,7 @@ pub(crate) fn import_candidates( /// found and suggested, returns `true`, otherwise returns `false`. fn show_candidates( tcx: TyCtxt<'_>, - err: &mut DiagnosticBuilder<'_>, + err: &mut Diag<'_>, // This is `None` if all placement locations are inside expansions use_placement_span: Option<Span>, candidates: &[ImportSuggestion], |
