]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/build/block.rs
Auto merge of #100707 - dzvon:fix-typo, r=davidtwco
[rust.git] / compiler / rustc_mir_build / src / build / block.rs
index 280b6aad12c0a9bbe702e5ed5a8f500916ca7a8b..d5213dc0e0467869d797370d41ef0d564ccd0957 100644 (file)
@@ -11,7 +11,7 @@ pub(crate) fn ast_block(
         &mut self,
         destination: Place<'tcx>,
         block: BasicBlock,
-        ast_block: &Block,
+        ast_block: BlockId,
         source_info: SourceInfo,
     ) -> BlockAnd<()> {
         let Block {
@@ -22,7 +22,7 @@ pub(crate) fn ast_block(
             expr,
             targeted_by_break,
             safety_mode,
-        } = *ast_block;
+        } = self.thir[ast_block];
         let expr = expr.map(|expr| &self.thir[expr]);
         self.in_opt_scope(opt_destruction_scope.map(|de| (de, source_info)), move |this| {
             this.in_scope((region_scope, source_info), LintLevel::Inherited, move |this| {
@@ -146,7 +146,7 @@ fn ast_block_stmts(
                                                 block,
                                                 init,
                                                 initializer_span,
-                                                else_block,
+                                                *else_block,
                                                 visibility_scope,
                                                 last_remainder_scope,
                                                 remainder_span,