Skip to content

Commit

Permalink
super_local_decl should visit source_info before copying it
Browse files Browse the repository at this point in the history
Visiting source_info first makes it consistent with other visitors
  • Loading branch information
kornelski committed Feb 8, 2025
1 parent a9e7b30 commit 6573b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,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 +864,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

0 comments on commit 6573b62

Please sign in to comment.