Skip to content

Commit

Permalink
ffffffffffffffffff
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed Jul 4, 2024
1 parent 66aa1cd commit e04f801
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_mir_transform/src/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,12 @@ fn remove_unused_definitions_helper(used_locals: &mut UsedLocals, body: &mut Bod

if !used_locals.preserve_debug {
body.var_debug_info.retain(|info| {
let keep = debug_info_is_for_simple_local(info)
.is_some_and(|local| used_locals.is_used(local));
let keep = if let Some(local) = debug_info_is_for_simple_local(info) {
used_locals.is_used(local)
} else {
// Keep non-simple debuginfo no matter what
true
};

if !keep {
trace!("removing var_debug_info {:?}", info);
Expand Down

0 comments on commit e04f801

Please sign in to comment.