Rename some Diagnostic
setters.
`Diagnostic` has 40 methods that return `&mut Self` and could be considered setters. Four of them have a `set_` prefix. This doesn't seem necessary for a type that implements the builder pattern. This commit removes the `set_` prefixes on those four methods.
This commit is contained in:
parent
e51e98dde6
commit
505c1371d0
53 changed files with 274 additions and 281 deletions
|
@ -497,7 +497,7 @@ impl server::FreeFunctions for Rustc<'_, '_> {
|
|||
fn emit_diagnostic(&mut self, diagnostic: Diagnostic<Self::Span>) {
|
||||
let mut diag =
|
||||
rustc_errors::Diagnostic::new(diagnostic.level.to_internal(), diagnostic.message);
|
||||
diag.set_span(MultiSpan::from_spans(diagnostic.spans));
|
||||
diag.span(MultiSpan::from_spans(diagnostic.spans));
|
||||
for child in diagnostic.children {
|
||||
diag.sub(child.level.to_internal(), child.message, MultiSpan::from_spans(child.spans));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue