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:
Nicholas Nethercote
2024-02-23 10:20:45 +11:00
parent 4e1f9bd528
commit 899cb40809
153 changed files with 1136 additions and 1367 deletions

View File

@@ -18,7 +18,7 @@ use crate::traits::{
Obligation, ObligationCause, PredicateObligation, PredicateObligations, SelectionContext,
};
use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::{DiagnosticBuilder, EmissionGuarantee};
use rustc_errors::{Diag, EmissionGuarantee};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_infer::infer::{DefineOpaqueTypes, InferCtxt, TyCtxtInferExt};
@@ -58,7 +58,7 @@ pub struct OverlapResult<'tcx> {
pub involves_placeholder: bool,
}
pub fn add_placeholder_note<G: EmissionGuarantee>(err: &mut DiagnosticBuilder<'_, G>) {
pub fn add_placeholder_note<G: EmissionGuarantee>(err: &mut Diag<'_, G>) {
err.note(
"this behavior recently changed as a result of a bug fix; \
see rust-lang/rust#56105 for details",