1
Fork 0

Rename many DiagCtxt arguments.

This commit is contained in:
Nicholas Nethercote 2023-12-18 10:15:45 +11:00
parent 4dc7fab56f
commit f422dca3ae
44 changed files with 317 additions and 353 deletions

View file

@ -16,12 +16,12 @@ pub struct TestOutput {
impl IntoDiagnostic<'_> for TestOutput {
fn into_diagnostic(
self,
handler: &'_ rustc_errors::DiagCtxt,
dcx: &'_ rustc_errors::DiagCtxt,
) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> {
let TestOutput { span, kind, content } = self;
#[allow(rustc::untranslatable_diagnostic)]
let mut diag = handler.struct_err(format!("{kind}({content})"));
let mut diag = dcx.struct_err(format!("{kind}({content})"));
diag.set_span(span);
diag
}