1
Fork 0

Rollup merge of #119828 - azhogin:azhogin/collapse_debuginfo_improved_attr, r=petrochenkov

Improved collapse_debuginfo attribute, added command-line flag

Improved attribute collapse_debuginfo with variants: `#[collapse_debuginfo=(no|external|yes)]`.
Added command-line flag for default behaviour.
Work-in-progress: will add more tests.

cc https://github.com/rust-lang/rust/issues/100758
This commit is contained in:
Matthias Krüger 2024-01-18 20:56:19 +01:00 committed by GitHub
commit c0da80f418
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 281 additions and 21 deletions

View file

@ -2535,8 +2535,7 @@ impl<'tcx> TyCtxt<'tcx> {
if self.sess.opts.unstable_opts.debug_macros || !span.from_expansion() {
return span;
}
let collapse_debuginfo_enabled = self.features().collapse_debuginfo;
hygiene::walk_chain_collapsed(span, upto, collapse_debuginfo_enabled)
hygiene::walk_chain_collapsed(span, upto, self.features().collapse_debuginfo)
}
#[inline]