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>>(
982982 // Insert all of the (mapped) parts of the callee body into the caller.
983983 caller_body. local_decls . extend ( callee_body. drain_vars_and_temps ( ) ) ;
984984 caller_body. source_scopes . append ( & mut callee_body. source_scopes ) ;
985+
986+ // only "full" debug promises any variable-level information
985987 if tcx
986988 . sess
987989 . opts
988990 . unstable_opts
989991 . inline_mir_preserve_debug
990- . unwrap_or ( tcx. sess . opts . debuginfo != DebugInfo :: None )
992+ . unwrap_or ( tcx. sess . opts . debuginfo == DebugInfo :: Full )
991993 {
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
993995 // people working on rust can build with or without debuginfo while
994996 // still getting consistent results from the mir-opt tests.
995997 caller_body. var_debug_info . append ( & mut callee_body. var_debug_info ) ;
You can’t perform that action at this time.
0 commit comments