]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/simplify_try.rs
Remove PlaceBase enum and make Place base field be local: Local
[rust.git] / src / librustc_mir / transform / simplify_try.rs
index 3b8871f86b28924073e09373eeecf91d87c48220..e733b0a5b5928dffdd04d888ceb5f591a56d9863 100644 (file)
@@ -137,9 +137,9 @@ struct VarField<'tcx> {
 fn match_variant_field_place<'tcx>(place: &Place<'tcx>) -> Option<(Local, VarField<'tcx>)> {
     match place.as_ref() {
         PlaceRef {
-            base: &PlaceBase::Local(local),
+            local,
             projection: &[ProjectionElem::Downcast(_, var_idx), ProjectionElem::Field(field, ty)],
-        } => Some((local, VarField { field, field_ty: ty, var_idx })),
+        } => Some((*local, VarField { field, field_ty: ty, var_idx })),
         _ => None,
     }
 }