Skip to content

Commit a82fd2b

Browse files
committed
Call maybe_expr_static_mut inside resolve_expr
1 parent 70ba4d1 commit a82fd2b

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+4
-0
lines changed

compiler/rustc_hir_analysis/src/check/region.rs

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ 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;
22+
2123
use std::mem;
2224

2325
#[derive(Debug, Copy, Clone)]
@@ -242,6 +244,8 @@ fn resolve_stmt<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, stmt: &'tcx h
242244
fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx hir::Expr<'tcx>) {
243245
debug!("resolve_expr - pre-increment {} expr = {:?}", visitor.expr_and_pat_count, expr);
244246

247+
maybe_expr_static_mut(visitor.tcx, *expr);
248+
245249
let prev_cx = visitor.cx;
246250
visitor.enter_node_scope_with_dtor(expr.hir_id.local_id);
247251

0 commit comments

Comments
 (0)