@@ -366,42 +366,41 @@ impl<'a, 'tcx> Qualifier<'a, 'tcx, 'tcx> {
366
366
367
367
TerminatorKind :: Return => {
368
368
if self . tcx . sess . features_untracked ( ) . const_let {
369
- break ;
370
- }
371
- // Check for unused values. This usually means
372
- // there are extra statements in the AST.
373
- for temp in mir. temps_iter ( ) {
374
- if self . local_qualif [ temp] . is_none ( ) {
375
- continue ;
376
- }
377
-
378
- let state = self . temp_promotion_state [ temp] ;
379
- if let TempState :: Defined { location, uses : 0 } = state {
380
- let data = & mir[ location. block ] ;
381
- let stmt_idx = location. statement_index ;
382
-
383
- // Get the span for the initialization.
384
- let source_info = if stmt_idx < data. statements . len ( ) {
385
- data. statements [ stmt_idx] . source_info
386
- } else {
387
- data. terminator ( ) . source_info
388
- } ;
389
- self . span = source_info. span ;
369
+ // Check for unused values. This usually means
370
+ // there are extra statements in the AST.
371
+ for temp in mir. temps_iter ( ) {
372
+ if self . local_qualif [ temp] . is_none ( ) {
373
+ continue ;
374
+ }
390
375
391
- // Treat this as a statement in the AST.
392
- self . statement_like ( ) ;
376
+ let state = self . temp_promotion_state [ temp] ;
377
+ if let TempState :: Defined { location, uses : 0 } = state {
378
+ let data = & mir[ location. block ] ;
379
+ let stmt_idx = location. statement_index ;
380
+
381
+ // Get the span for the initialization.
382
+ let source_info = if stmt_idx < data. statements . len ( ) {
383
+ data. statements [ stmt_idx] . source_info
384
+ } else {
385
+ data. terminator ( ) . source_info
386
+ } ;
387
+ self . span = source_info. span ;
388
+
389
+ // Treat this as a statement in the AST.
390
+ self . statement_like ( ) ;
391
+ }
393
392
}
394
- }
395
393
396
- // Make sure there are no extra unassigned variables.
397
- self . qualif = Qualif :: NOT_CONST ;
398
- for index in mir. vars_iter ( ) {
399
- if !self . const_fn_arg_vars . contains ( index. index ( ) ) {
400
- debug ! ( "unassigned variable {:?}" , index) ;
401
- self . assign ( & Place :: Local ( index) , Location {
402
- block : bb,
403
- statement_index : usize:: MAX ,
404
- } ) ;
394
+ // Make sure there are no extra unassigned variables.
395
+ self . qualif = Qualif :: NOT_CONST ;
396
+ for index in mir. vars_iter ( ) {
397
+ if !self . const_fn_arg_vars . contains ( index. index ( ) ) {
398
+ debug ! ( "unassigned variable {:?}" , index) ;
399
+ self . assign ( & Place :: Local ( index) , Location {
400
+ block : bb,
401
+ statement_index : usize:: MAX ,
402
+ } ) ;
403
+ }
405
404
}
406
405
}
407
406
0 commit comments