Skip to content

Commit a4e6009

Browse files
committed
Minor fixups based on feedback
1 parent a05560b commit a4e6009

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc_const_eval/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &hir::Expr) {
218218
if !pat_ty.is_uninhabited(cx.tcx) {
219219
// We know the type is inhabited, so this must be wrong
220220
let mut err = struct_span_err!(cx.tcx.sess, ex.span, E0002,
221-
"non-exhaustive patterns: type {} is inhabited",
221+
"non-exhaustive patterns: type {} is non-empty",
222222
pat_ty);
223223
span_help!(&mut err, ex.span,
224224
"Please ensure that all possible cases are being handled; \

src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ impl<'a> State<'a> {
977977
try!(self.print_mt(mt));
978978
}
979979
ast::TyKind::Never => {
980-
word(&mut self.s, "!")?;
980+
try!(word(&mut self.s, "!"));
981981
},
982982
ast::TyKind::Tup(ref elts) => {
983983
try!(self.popen());

0 commit comments

Comments
 (0)