]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #99556 - davidtwco:collapse-debuginfo, r=wesleywiser
authorbors <bors@rust-lang.org>
Tue, 13 Sep 2022 01:19:05 +0000 (01:19 +0000)
committerbors <bors@rust-lang.org>
Tue, 13 Sep 2022 01:19:05 +0000 (01:19 +0000)
commit0df1ddc185af0d1b8d476851a50c42a31ebbb741
tree3f8be06a747146cf6d86ba4788ddab17b166ce91
parent089584db01c85c24cc98a532eb7d02f651a2c137
parent38958aa8bdd2b46dd7f9213bda1c9c6433282a68
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
compiler/rustc_feature/src/active.rs
compiler/rustc_feature/src/builtin_attrs.rs
compiler/rustc_middle/src/ty/context.rs
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_passes/src/check_attr.rs
compiler/rustc_span/src/symbol.rs