Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,9 @@ macro_rules! make_mir_visitor {
target: _,
unwind: _,
call_source: _,
fn_span: _
fn_span,
} => {
self.visit_span($(& $mutability)? *fn_span);
self.visit_operand(func, location);
for arg in args {
self.visit_operand(&$($mutability)? arg.node, location);
Expand All @@ -543,8 +544,9 @@ macro_rules! make_mir_visitor {
TerminatorKind::TailCall {
func,
args,
fn_span: _,
fn_span,
} => {
self.visit_span($(& $mutability)? *fn_span);
self.visit_operand(func, location);
for arg in args {
self.visit_operand(&$($mutability)? arg.node, location);
Expand Down Expand Up @@ -853,6 +855,8 @@ macro_rules! make_mir_visitor {
local_info: _,
} = local_decl;

self.visit_source_info(source_info);

self.visit_ty($(& $mutability)? *ty, TyContext::LocalDecl {
local,
source_info: *source_info,
Expand All @@ -862,7 +866,6 @@ macro_rules! make_mir_visitor {
self.visit_user_type_projection(user_ty);
}
}
self.visit_source_info(source_info);
}

fn super_var_debug_info(
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_mir_transform/src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,8 @@ impl<'tcx> MutVisitor<'tcx> for Integrator<'_, 'tcx> {
// replaced down below anyways).
if !matches!(terminator.kind, TerminatorKind::Return) {
self.super_terminator(terminator, loc);
} else {
self.visit_source_info(&mut terminator.source_info);
}

match terminator.kind {
Expand Down
Loading