Skip to content

Commit 5b5255d

Browse files
committed
Fix match ergonomics suggestion
1 parent 8094d6e commit 5b5255d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_typeck/check/_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
540540
err.help(&format!("did you mean `{}: &{}`?", snippet, expected));
541541
}
542542
}
543-
hir::Node::Expr(hir::Expr { node: hir::ExprKind::Match(..), .. }) |
543+
hir::Node::Arm(_) |
544544
hir::Node::Pat(_) => {
545545
// rely on match ergonomics or it might be nested `&&pat`
546546
if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(inner.span) {

0 commit comments

Comments
 (0)