Skip to content

Commit a4a774a

Browse files
committed
Call maybe_stmt_static_mut inside resolve_stmt
1 parent 5e01c26 commit a4a774a

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+3
-1
lines changed

compiler/rustc_hir_analysis/src/check/region.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_middle::ty::TyCtxt;
1818
use rustc_span::source_map;
1919
use rustc_span::Span;
2020

21-
use super::errs::maybe_expr_static_mut;
21+
use super::errs::{maybe_expr_static_mut, maybe_stmt_static_mut};
2222

2323
use std::mem;
2424

@@ -216,6 +216,8 @@ fn resolve_stmt<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, stmt: &'tcx h
216216
let stmt_id = stmt.hir_id.local_id;
217217
debug!("resolve_stmt(stmt.id={:?})", stmt_id);
218218

219+
maybe_stmt_static_mut(visitor.tcx, *stmt);
220+
219221
// Every statement will clean up the temporaries created during
220222
// execution of that statement. Therefore each statement has an
221223
// associated destruction scope that represents the scope of the

0 commit comments

Comments
 (0)