1
Fork 0

Remove trailing space in error message

This commit is contained in:
Camelid 2020-09-30 11:29:19 -07:00
parent 05d0b969d9
commit b2ce3e5344
2 changed files with 2 additions and 2 deletions

View file

@ -232,7 +232,7 @@ impl<'tcx> ty::TyS<'tcx> {
let n = tcx.lift(&n).unwrap(); let n = tcx.lift(&n).unwrap();
match n.try_eval_usize(tcx, ty::ParamEnv::empty()) { match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
_ if t.is_simple_ty() => format!("array `{}`", self).into(), _ if t.is_simple_ty() => format!("array `{}`", self).into(),
Some(n) => format!("array of {} element{} ", n, pluralize!(n)).into(), Some(n) => format!("array of {} element{}", n, pluralize!(n)).into(),
None => "array".into(), None => "array".into(),
} }
} }

View file

@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/slice-to-vec-comparison.rs:4:9 --> $DIR/slice-to-vec-comparison.rs:4:9
| |
LL | a > b; LL | a > b;
| ^ expected array of 0 elements , found struct `Vec` | ^ expected array of 0 elements, found struct `Vec`
| |
= note: expected reference `&[_; 0]` = note: expected reference `&[_; 0]`
found reference `&Vec<u8>` found reference `&Vec<u8>`