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
|
@ -846,7 +846,7 @@ impl<'a> Parser<'a> {
|
|||
) =>
|
||||
{
|
||||
let n_hashes: u8 = *n_hashes;
|
||||
err.set_primary_message("too many `#` when terminating raw string");
|
||||
err.primary_message("too many `#` when terminating raw string");
|
||||
let str_span = self.prev_token.span;
|
||||
let mut span = self.token.span;
|
||||
let mut count = 0;
|
||||
|
@ -857,7 +857,7 @@ impl<'a> Parser<'a> {
|
|||
self.bump();
|
||||
count += 1;
|
||||
}
|
||||
err.set_span(span);
|
||||
err.span(span);
|
||||
err.span_suggestion(
|
||||
span,
|
||||
format!("remove the extra `#`{}", pluralize!(count)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue