File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -982,14 +982,16 @@ fn inline_call<'tcx, I: Inliner<'tcx>>(
982
982
// Insert all of the (mapped) parts of the callee body into the caller.
983
983
caller_body. local_decls . extend ( callee_body. drain_vars_and_temps ( ) ) ;
984
984
caller_body. source_scopes . append ( & mut callee_body. source_scopes ) ;
985
+
986
+ // only "full" debug promises any variable-level information
985
987
if tcx
986
988
. sess
987
989
. opts
988
990
. unstable_opts
989
991
. inline_mir_preserve_debug
990
- . unwrap_or ( tcx. sess . opts . debuginfo != DebugInfo :: None )
992
+ . unwrap_or ( tcx. sess . opts . debuginfo == DebugInfo :: Full )
991
993
{
992
- // Note that we need to preserve these in the standard library so that
994
+ // -Zinline-mir-preserve-debug is enabled when building the standard library, so that
993
995
// people working on rust can build with or without debuginfo while
994
996
// still getting consistent results from the mir-opt tests.
995
997
caller_body. var_debug_info . append ( & mut callee_body. var_debug_info ) ;
You can’t perform that action at this time.
0 commit comments