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
|
@ -925,9 +925,8 @@ impl<'a> Parser<'a> {
|
|||
});
|
||||
}
|
||||
|
||||
expect_err.set_primary_message(
|
||||
"closure bodies that contain statements must be surrounded by braces",
|
||||
);
|
||||
expect_err
|
||||
.primary_message("closure bodies that contain statements must be surrounded by braces");
|
||||
|
||||
let preceding_pipe_span = closure_spans.closing_pipe;
|
||||
let following_token_span = self.token.span;
|
||||
|
@ -951,7 +950,7 @@ impl<'a> Parser<'a> {
|
|||
);
|
||||
expect_err.span_note(second_note, "the closure body may be incorrectly delimited");
|
||||
|
||||
expect_err.set_span(vec![preceding_pipe_span, following_token_span]);
|
||||
expect_err.span(vec![preceding_pipe_span, following_token_span]);
|
||||
|
||||
let opening_suggestion_str = " {".to_string();
|
||||
let closing_suggestion_str = "}".to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue