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
|
@ -1,6 +1,6 @@
|
|||
//! Errors emitted by symbol_mangling.
|
||||
|
||||
use rustc_errors::{DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level};
|
||||
use rustc_errors::{Diag, DiagCtxt, EmissionGuarantee, IntoDiagnostic, Level};
|
||||
use rustc_span::Span;
|
||||
use std::fmt;
|
||||
|
||||
|
@ -14,11 +14,11 @@ pub struct TestOutput {
|
|||
// natural language, and (b) it's only used in tests. So we construct it
|
||||
// manually and avoid the fluent machinery.
|
||||
impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TestOutput {
|
||||
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
|
||||
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> {
|
||||
let TestOutput { span, kind, content } = self;
|
||||
|
||||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
DiagnosticBuilder::new(dcx, level, format!("{kind}({content})")).with_span(span)
|
||||
Diag::new(dcx, level, format!("{kind}({content})")).with_span(span)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue