Remove dcx arg from ReportErrorExt::add_args.

Because it also has a `DiagnosticBuilder` arg, which contains a `dcx`
reference.

Also rename some `builder` variables as `diag`, because that's the usual
name.
This commit is contained in:
Nicholas Nethercote 2024-02-12 15:18:18 +11:00
parent 30774b0061
commit e0a0cc2971
3 changed files with 62 additions and 76 deletions

View file

@ -151,7 +151,7 @@ where
let mut err = tcx.dcx().create_err(err);
let msg = error.diagnostic_message();
error.add_args(tcx.dcx(), &mut err);
error.add_args(&mut err);
// Use *our* span to label the interp error
err.span_label(our_span, msg);