1
Fork 0

Auto merge of #76754 - varkor:diagnostic-cleanup-ii, r=ecstatic-morse

Clean up diagnostics for arithmetic operation errors

Plus a small tweak to a range pattern error message.
This commit is contained in:
bors 2020-09-29 14:28:58 +00:00
commit 4d52dc4790
119 changed files with 452 additions and 447 deletions

View file

@ -495,7 +495,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
self.tcx.sess,
span,
E0029,
"only char and numeric types are allowed in range patterns"
"only `char` and numeric types are allowed in range patterns"
);
let msg = |ty| format!("this is of type `{}` but it should be `char` or numeric", ty);
let mut one_side_err = |first_span, first_ty, second: Option<(bool, Ty<'tcx>, Span)>| {