]> git.lizzy.rs Git - rust.git/commitdiff
Remove unnecessary block
authorJonas Schievink <jonasschievink@gmail.com>
Thu, 16 Apr 2020 18:04:46 +0000 (20:04 +0200)
committerJonas Schievink <jonasschievink@gmail.com>
Mon, 20 Apr 2020 19:18:20 +0000 (21:18 +0200)
src/librustc_mir/interpret/operand.rs

index d5864d1d4db079d60af932d5ec142b1fd38f5ea7..8188106b5f1876234e4d54dfabe42a290d00c9b0 100644 (file)
@@ -453,13 +453,11 @@ pub fn eval_place_to_op(
         place: mir::Place<'tcx>,
         layout: Option<TyAndLayout<'tcx>>,
     ) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>> {
-        let base_op = {
-            // Do not use the layout passed in as argument if the base we are looking at
-            // here is not the entire place.
-            let layout = if place.projection.is_empty() { layout } else { None };
+        // Do not use the layout passed in as argument if the base we are looking at
+        // here is not the entire place.
+        let layout = if place.projection.is_empty() { layout } else { None };
 
-            self.access_local(self.frame(), place.local, layout)?
-        };
+        let base_op = self.access_local(self.frame(), place.local, layout)?;
 
         let op = place
             .projection