1
Fork 0

Remove render_span args from Diagnostic::{sub,sub_with_highlight}.

They're always `None`.
This commit is contained in:
Nicholas Nethercote 2023-12-21 10:24:44 +11:00
parent 824667f753
commit 125337bd68
2 changed files with 15 additions and 27 deletions

View file

@ -499,12 +499,7 @@ impl server::FreeFunctions for Rustc<'_, '_> {
rustc_errors::Diagnostic::new(diagnostic.level.to_internal(), diagnostic.message);
diag.set_span(MultiSpan::from_spans(diagnostic.spans));
for child in diagnostic.children {
diag.sub(
child.level.to_internal(),
child.message,
MultiSpan::from_spans(child.spans),
None,
);
diag.sub(child.level.to_internal(), child.message, MultiSpan::from_spans(child.spans));
}
self.sess().dcx.emit_diagnostic(diag);
}