1
Fork 0

Auto merge of #99556 - davidtwco:collapse-debuginfo, r=wesleywiser

ssa: implement `#[collapse_debuginfo]`

cc #39153 rust-lang/compiler-team#386

Debuginfo line information for macro invocations are collapsed by default - line information are replaced by the line of the outermost expansion site. Using `-Zdebug-macros` disables this behaviour.

When the `collapse_debuginfo` feature is enabled, the default behaviour is reversed so that debuginfo is not collapsed by default. In addition, the `#[collapse_debuginfo]` attribute is available and can be applied to macro definitions which will then have their line information collapsed.

r? rust-lang/wg-debugging
This commit is contained in:
bors 2022-09-13 01:19:05 +00:00
commit 0df1ddc185
21 changed files with 700 additions and 36 deletions

View file

@ -265,3 +265,6 @@ passes_rustc_lint_opt_deny_field_access = `#[rustc_lint_opt_deny_field_access]`
passes_link_ordinal = attribute should be applied to a foreign function or static
.label = not a foreign function or static
passes_collapse_debuginfo = `collapse_debuginfo` attribute should be applied to macro definitions
.label = not a macro definition