Prefer dcx
methods over fields or fields' methods
This commit is contained in:
parent
7e5893019c
commit
c91edc3888
24 changed files with 62 additions and 58 deletions
|
@ -522,7 +522,7 @@ impl server::FreeFunctions for Rustc<'_, '_> {
|
|||
fn emit_diagnostic(&mut self, diagnostic: Diagnostic<Self::Span>) {
|
||||
let message = rustc_errors::DiagMessage::from(diagnostic.message);
|
||||
let mut diag: Diag<'_, ()> =
|
||||
Diag::new(&self.psess().dcx, diagnostic.level.to_internal(), message);
|
||||
Diag::new(self.psess().dcx(), diagnostic.level.to_internal(), message);
|
||||
diag.span(MultiSpan::from_spans(diagnostic.spans));
|
||||
for child in diagnostic.children {
|
||||
// This message comes from another diagnostic, and we are just reconstructing the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue