Minor fixups based on feedback

This commit is contained in:
Andrew Cann
2016-08-03 13:59:27 +08:00
parent a05560bebe
commit a4e6009bf0
2 changed files with 2 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &hir::Expr) {
if !pat_ty.is_uninhabited(cx.tcx) {
// We know the type is inhabited, so this must be wrong
let mut err = struct_span_err!(cx.tcx.sess, ex.span, E0002,
"non-exhaustive patterns: type {} is inhabited",
"non-exhaustive patterns: type {} is non-empty",
pat_ty);
span_help!(&mut err, ex.span,
"Please ensure that all possible cases are being handled; \

View File

@@ -977,7 +977,7 @@ impl<'a> State<'a> {
try!(self.print_mt(mt));
}
ast::TyKind::Never => {
word(&mut self.s, "!")?;
try!(word(&mut self.s, "!"));
},
ast::TyKind::Tup(ref elts) => {
try!(self.popen());