@@ -188,10 +188,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
188
188
let ptr_ty = ptr. ty ;
189
189
// Create an *internal* temp for the pointer, so that unsafety
190
190
// checking won't complain about the raw pointer assignment.
191
- let ptr_temp = this. local_decls . push ( LocalDecl :: with_source_info (
192
- ptr_ty,
193
- source_info,
194
- ) . internal ( ) ) ;
191
+ let ptr_temp = this
192
+ . local_decls
193
+ . push ( LocalDecl :: with_source_info ( ptr_ty, source_info) . internal ( ) ) ;
195
194
let ptr_temp = Place :: from ( ptr_temp) ;
196
195
let block = unpack ! ( this. into( ptr_temp, block, ptr) ) ;
197
196
this. into ( this. hir . tcx ( ) . mk_place_deref ( ptr_temp) , block, val)
@@ -224,7 +223,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
224
223
Some ( ( destination, success) )
225
224
} ,
226
225
from_hir_call,
227
- fn_span
226
+ fn_span,
228
227
} ,
229
228
) ;
230
229
success. unit ( )
@@ -387,15 +386,18 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
387
386
// These cases don't actually need a destination
388
387
ExprKind :: Assign { .. }
389
388
| ExprKind :: AssignOp { .. }
390
- | ExprKind :: Continue { .. }
391
- | ExprKind :: Break { .. }
392
- | ExprKind :: LlvmInlineAsm { .. }
393
- | ExprKind :: Return { .. } => {
389
+ | ExprKind :: LlvmInlineAsm { .. } => {
394
390
unpack ! ( block = this. stmt_expr( block, expr, None ) ) ;
395
391
this. cfg . push_assign_unit ( block, source_info, destination, this. hir . tcx ( ) ) ;
396
392
block. unit ( )
397
393
}
398
394
395
+ ExprKind :: Continue { .. } | ExprKind :: Break { .. } | ExprKind :: Return { .. } => {
396
+ unpack ! ( block = this. stmt_expr( block, expr, None ) ) ;
397
+ // No assign, as these have type `!`.
398
+ block. unit ( )
399
+ }
400
+
399
401
// Avoid creating a temporary
400
402
ExprKind :: VarRef { .. }
401
403
| ExprKind :: SelfRef
0 commit comments