Rename DiagnosticBuilder
as Diag
.
Much better! Note that this involves renaming (and updating the value of) `DIAGNOSTIC_BUILDER` in clippy.
This commit is contained in:
parent
4e1f9bd528
commit
899cb40809
153 changed files with 1136 additions and 1367 deletions
|
@ -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;
|
||||
|
@ -1403,7 +1403,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,
|
||||
|
@ -1519,7 +1519,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 {
|
||||
|
@ -2465,7 +2465,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,
|
||||
) {
|
||||
|
@ -2674,7 +2674,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],
|
||||
|
@ -2700,7 +2700,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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue