Minor fixups based on feedback
This commit is contained in:
@@ -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; \
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user