Reduce verbosity of some type ascription errors
* Deduplicate type ascription LHS errors * Remove duplicated `:` -> `::` suggestion from parse error * Tweak wording to be more accurate * Modify `current_type_ascription` to reduce span wrangling * remove now unnecessary match arm * Add run-rustfix to appropriate tests
This commit is contained in:
parent
6b09c37ddc
commit
6ed06b2ba9
28 changed files with 212 additions and 181 deletions
|
|
@ -333,6 +333,7 @@ impl<'a> Parser<'a> {
|
|||
Applicability::MachineApplicable
|
||||
},
|
||||
);
|
||||
self.sess.type_ascription_path_suggestions.borrow_mut().insert(sp);
|
||||
} else if op_pos.line != next_pos.line && maybe_expected_semicolon {
|
||||
err.span_suggestion(
|
||||
sp,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue