Reword type ascription note to reduce verbosity

This commit is contained in:
Esteban Küber 2019-03-22 20:14:20 -07:00
parent 44a086ef39
commit d72ef21ddd
10 changed files with 11 additions and 65 deletions

View file

@ -3708,11 +3708,7 @@ impl<'a> Parser<'a> {
you annotate an expression with a type: `<expr>: <type>`");
err.span_note(
lhs_span,
"this expression is annotated with type ascription...",
);
err.span_note(
cur_op_span,
"...due to this, which is why a type is expected after",
"this expression expects an ascribed type after the colon",
);
err.help("this might be indicative of a syntax error elsewhere");
}