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:
parent
30774b0061
commit
e0a0cc2971
3 changed files with 62 additions and 76 deletions
|
@ -445,7 +445,7 @@ pub fn format_interp_error<'tcx>(dcx: &DiagCtxt, e: InterpErrorInfo<'tcx>) -> St
|
|||
#[allow(rustc::untranslatable_diagnostic)]
|
||||
let mut diag = dcx.struct_allow("");
|
||||
let msg = e.diagnostic_message();
|
||||
e.add_args(dcx, &mut diag);
|
||||
e.add_args(&mut diag);
|
||||
let s = dcx.eagerly_translate_to_string(msg, diag.args());
|
||||
diag.cancel();
|
||||
s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue