X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibrustc_codegen_llvm%2Fdebuginfo%2Fcreate_scope_map.rs;h=cdb9657e1ff3c3b294b1a57068e3ebc59f8ab86b;hb=c934c94212755eee25e86d9d49fb057073a28b91;hp=eba05ed5d7787096b1e83c3b73df344bb4f5e258;hpb=ec7f209ad426208c9bc40f4e49c870d5364b47b2;p=rust.git diff --git a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs index eba05ed5d77..cdb9657e1ff 100644 --- a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs +++ b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs @@ -66,14 +66,8 @@ fn make_mir_scope( if !has_variables.contains(scope) { // Do not create a DIScope if there are no variables // defined in this MIR Scope, to avoid debuginfo bloat. - - // However, we don't skip creating a nested scope if - // our parent is the root, because we might want to - // put arguments in the root and not have shadowing. - if parent_scope.scope_metadata.unwrap() != fn_metadata { - debug_context.scopes[scope] = parent_scope; - return; - } + debug_context.scopes[scope] = parent_scope; + return; } let loc = span_start(cx, scope_data.span);