File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1173,6 +1173,7 @@ fn resolve_local<'tcx>(
11731173 /// | VariantName(..., P&, ...)
11741174 /// | [ ..., P&, ... ]
11751175 /// | ( ..., P&, ... )
1176+ /// | ... "|" P& "|" ...
11761177 /// | box P&
11771178 fn is_binding_pat ( pat : & hir:: Pat ) -> bool {
11781179 // Note that the code below looks for *explicit* refs only, that is, it won't
@@ -1212,6 +1213,7 @@ fn resolve_local<'tcx>(
12121213 pats3. iter ( ) . any ( |p| is_binding_pat ( & p) )
12131214 }
12141215
1216+ PatKind :: Or ( ref subpats) |
12151217 PatKind :: TupleStruct ( _, ref subpats, _) |
12161218 PatKind :: Tuple ( ref subpats, _) => {
12171219 subpats. iter ( ) . any ( |p| is_binding_pat ( & p) )
@@ -1221,7 +1223,13 @@ fn resolve_local<'tcx>(
12211223 is_binding_pat ( & subpat)
12221224 }
12231225
1224- _ => false ,
1226+ PatKind :: Ref ( _, _) |
1227+ PatKind :: Binding ( hir:: BindingAnnotation :: Unannotated , ..) |
1228+ PatKind :: Binding ( hir:: BindingAnnotation :: Mutable , ..) |
1229+ PatKind :: Wild |
1230+ PatKind :: Path ( _) |
1231+ PatKind :: Lit ( _) |
1232+ PatKind :: Range ( _, _, _) => false ,
12251233 }
12261234 }
12271235
You can’t perform that action at this time.
0 commit comments