Adjust new suggestions to the suggestion guidelines

This commit is contained in:
Oliver Schneider 2017-07-21 13:59:17 +02:00
parent d361efac26
commit 401ab612c2
10 changed files with 40 additions and 64 deletions

View file

@ -2936,7 +2936,7 @@ impl<'a> Parser<'a> {
let expr_str = self.sess.codemap().span_to_snippet(expr.span)
.unwrap_or(pprust::expr_to_string(&expr));
err.span_suggestion(expr.span,
"if you want to compare the casted value then write:",
"try comparing the casted value",
format!("({})", expr_str));
err.emit();