Skip to content

Commit

Permalink
Remove trailing space in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Sep 30, 2020
1 parent 05d0b96 commit b2ce3e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl<'tcx> ty::TyS<'tcx> {
let n = tcx.lift(&n).unwrap();
match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
_ 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(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/slice-to-vec-comparison.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/slice-to-vec-comparison.rs:4:9
|
LL | a > b;
| ^ expected array of 0 elements , found struct `Vec`
| ^ expected array of 0 elements, found struct `Vec`
|
= note: expected reference `&[_; 0]`
found reference `&Vec<u8>`
Expand Down

0 comments on commit b2ce3e5

Please sign in to comment.