Diagnostic
cleanups
- `emitted_at` isn't used outside the crate. - `code` and `messages` are public fields, so there's no point have trivial getters/setters for them. - `suggestions` is public, so the comment about "functionality on `Diagnostic`" isn't needed.
This commit is contained in:
parent
585367f15f
commit
a9a2e1565a
7 changed files with 9 additions and 26 deletions
|
@ -590,7 +590,6 @@ fn infer_placeholder_type<'a>(
|
|||
|
||||
// The parser provided a sub-optimal `HasPlaceholders` suggestion for the type.
|
||||
// We are typeck and have the real type, so remove that and suggest the actual type.
|
||||
// FIXME(eddyb) this looks like it should be functionality on `Diagnostic`.
|
||||
if let Ok(suggestions) = &mut err.suggestions {
|
||||
suggestions.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue