Skip to content

Commit

Permalink
Fix match ergonomics suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed May 21, 2019
1 parent 015a451 commit 0835048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
err.help(&format!("did you mean `{}: &{}`?", snippet, expected));
}
}
hir::Node::Expr(hir::Expr { node: hir::ExprKind::Match(..), .. }) |
hir::Node::Arm(_) |
hir::Node::Pat(_) => {
// rely on match ergonomics or it might be nested `&&pat`
if let Ok(snippet) = tcx.sess.source_map().span_to_snippet(inner.span) {
Expand Down

0 comments on commit 0835048

Please sign in to comment.