Call maybe_expr_static_mut inside resolve_expr

This commit is contained in:
Obei Sideg 2023-12-22 15:03:45 +03:00
parent 70ba4d14b3
commit a82fd2bc7c

View File

@ -18,6 +18,8 @@
use rustc_span::source_map;
use rustc_span::Span;
use super::errs::maybe_expr_static_mut;
use std::mem;
#[derive(Debug, Copy, Clone)]
@ -242,6 +244,8 @@ fn resolve_stmt<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, stmt: &'tcx h
fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx hir::Expr<'tcx>) {
debug!("resolve_expr - pre-increment {} expr = {:?}", visitor.expr_and_pat_count, expr);
maybe_expr_static_mut(visitor.tcx, *expr);
let prev_cx = visitor.cx;
visitor.enter_node_scope_with_dtor(expr.hir_id.local_id);