X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_mir%2Fhair%2Fcx%2Fblock.rs;h=48558ba6db24dc672b80c4a6bd1b318296724570;hb=114314c92037d0e3e1320e9c7e4147f5b3bc2c63;hp=14aa307f0ae1f1a24652a4b6a60cb3cf44da2edc;hpb=3d68959dd2c15dbab3f444216b6357319aa40f13;p=rust.git diff --git a/src/librustc_mir/hair/cx/block.rs b/src/librustc_mir/hair/cx/block.rs index 14aa307f0ae..48558ba6db2 100644 --- a/src/librustc_mir/hair/cx/block.rs +++ b/src/librustc_mir/hair/cx/block.rs @@ -20,7 +20,7 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Block { type Output = Block<'tcx>; fn make_mirror<'a, 'gcx>(self, cx: &mut Cx<'a, 'gcx, 'tcx>) -> Block<'tcx> { - // We have to eagerly translate the "spine" of the statements + // We have to eagerly lower the "spine" of the statements // in order to get the lexical scoping correctly. let stmts = mirror_stmts(cx, self.hir_id.local_id, &*self.stmts); let opt_destruction_scope = @@ -55,8 +55,8 @@ fn mirror_stmts<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>, let hir_id = cx.tcx.hir.node_to_hir_id(stmt.node.id()); let opt_dxn_ext = cx.region_scope_tree.opt_destruction_scope(hir_id.local_id); match stmt.node { - hir::StmtExpr(ref expr, _) | - hir::StmtSemi(ref expr, _) => { + hir::StmtKind::Expr(ref expr, _) | + hir::StmtKind::Semi(ref expr, _) => { result.push(StmtRef::Mirror(Box::new(Stmt { kind: StmtKind::Expr { scope: region::Scope::Node(hir_id.local_id), @@ -65,7 +65,7 @@ fn mirror_stmts<'a, 'gcx, 'tcx>(cx: &mut Cx<'a, 'gcx, 'tcx>, opt_destruction_scope: opt_dxn_ext, }))) } - hir::StmtDecl(ref decl, _) => { + hir::StmtKind::Decl(ref decl, _) => { match decl.node { hir::DeclItem(..) => { // ignore for purposes of the MIR