File tree 1 file changed +9
-1
lines changed
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>(
1173
1173
/// | VariantName(..., P&, ...)
1174
1174
/// | [ ..., P&, ... ]
1175
1175
/// | ( ..., P&, ... )
1176
+ /// | ... "|" P& "|" ...
1176
1177
/// | box P&
1177
1178
fn is_binding_pat ( pat : & hir:: Pat ) -> bool {
1178
1179
// Note that the code below looks for *explicit* refs only, that is, it won't
@@ -1212,6 +1213,7 @@ fn resolve_local<'tcx>(
1212
1213
pats3. iter ( ) . any ( |p| is_binding_pat ( & p) )
1213
1214
}
1214
1215
1216
+ PatKind :: Or ( ref subpats) |
1215
1217
PatKind :: TupleStruct ( _, ref subpats, _) |
1216
1218
PatKind :: Tuple ( ref subpats, _) => {
1217
1219
subpats. iter ( ) . any ( |p| is_binding_pat ( & p) )
@@ -1221,7 +1223,13 @@ fn resolve_local<'tcx>(
1221
1223
is_binding_pat ( & subpat)
1222
1224
}
1223
1225
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 ,
1225
1233
}
1226
1234
}
1227
1235
You can’t perform that action at this time.
0 commit comments