]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_mir/build/expr/as_operand.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / src / librustc_mir / build / expr / as_operand.rs
index e354a2ee8160b47f1f17c40b8561df9eb14e82e4..207399fbdcf0e6a3a928bdbe92a3c1658c78c708 100644 (file)
@@ -6,7 +6,7 @@ use crate::hair::*;
 use rustc::middle::region;
 use rustc::mir::*;
 
-impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
+impl<'a, 'tcx> Builder<'a, 'tcx> {
     /// Returns an operand suitable for use until the end of the current
     /// scope expression.
     ///
@@ -57,7 +57,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
         {
             let source_info = this.source_info(expr.span);
             let region_scope = (region_scope, source_info);
-            return this.in_scope(region_scope, lint_level, block, |this| {
+            return this.in_scope(region_scope, lint_level, |this| {
                 this.as_operand(block, scope, value)
             });
         }
@@ -74,7 +74,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
             }
             Category::Place | Category::Rvalue(..) => {
                 let operand = unpack!(block = this.as_temp(block, scope, expr, Mutability::Mut));
-                block.and(Operand::Move(Place::Base(PlaceBase::Local(operand))))
+                block.and(Operand::Move(Place::from(operand)))
             }
         }
     }