Skip to content

Commit

Permalink
fix nit
Browse files Browse the repository at this point in the history
  • Loading branch information
roxelo committed Jul 28, 2021
1 parent 9829efb commit d380ed1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion compiler/rustc_typeck/src/expr_use_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,15 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
// to borrow discr.
needs_to_be_read = true;
}
_ => {
PatKind::Or(_)
| PatKind::Box(_)
| PatKind::Slice(..)
| PatKind::Ref(..)
| PatKind::Wild => {
// If the PatKind is Or, Box, Slice or Ref, the decision is made later
// as these patterns contains subpatterns
// If the PatKind is Wild, the decision is made based on the other patterns being
// examined
}
}
}));
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/closures/2229_closure_analysis/issue-87426.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ pub fn foo() {

fn main() {
foo();
}
}

0 comments on commit d380ed1

Please sign in to comment.