You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #120845 - petrochenkov:debmac, r=<try>
debuginfo: Stabilize `-Z debug-macros`, `-Z collapse-macro-debuginfo` and `#[collapse_debuginfo]`
`-Z debug-macros` is "stabilized" by enabling it by default and removing.
`-Z collapse-macro-debuginfo` is stabilized as `-C collapse-macro-debuginfo`.
It now supports all typical boolean values (`parse_opt_bool`) in addition to just yes/no.
Default value of `collapse_debuginfo` was changed from `false` to `external` (i.e. collapsed if external, not collapsed if local) - #100758 (comment) describes some debugging scenarios that motivate this default as reasonable.
`#[collapse_debuginfo]` attribute without a value is no longer supported to avoid guessing the default.
Closes#100758Closes#41743Closes#39153
TODO: Stabilization report
// Based on https://github.com/rust-lang/rust/blob/e369d87b015a84653343032833d65d0545fd3f26/src/librustc_codegen_ssa/mir/mod.rs#L116-L131
68
-
// In order to have a good line stepping behavior in debugger, we overwrite debug
69
-
// locations of macro expansions with that of the outermost expansion site (when the macro is
70
-
// annotated with `#[collapse_debuginfo]` or when `-Zdebug-macros` is provided).
71
-
let span = tcx.collapsed_debuginfo(span, function_span);
67
+
// Match behavior of `FunctionCx::adjusted_span_and_dbg_scope`.
68
+
let span = hygiene::walk_chain_collapsed(span, function_span);
72
69
match tcx.sess.source_map().lookup_line(span.lo()){
0 commit comments