Auto merge of #120112 - matthiaskrgr:rollup-48o3919, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #119582 (bootstrap: handle vendored sources when remapping crate paths)
 - #119730 (docs: fix typos)
 - #119828 (Improved collapse_debuginfo attribute, added command-line flag)
 - #119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`)
 - #120037 (Remove `next_root_ty_var`)
 - #120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18)
 - #120096 (Set RUSTC_BOOTSTRAP=1 consistently)
 - #120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned)
 - #120102 (Fix typo in munmap_partial.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-01-19 08:42:17 +00:00
commit 92d727796b
61 changed files with 767 additions and 251 deletions

View file

@ -464,12 +464,15 @@ impl HygieneData {
&self,
mut span: Span,
to: Span,
collapse_debuginfo_enabled: bool,
collapse_debuginfo_feature_enabled: bool,
) -> Span {
let orig_span = span;
let mut ret_span = span;
debug!("walk_chain_collapsed({:?}, {:?})", span, to);
debug!(
"walk_chain_collapsed({:?}, {:?}), feature_enable={}",
span, to, collapse_debuginfo_feature_enabled,
);
debug!("walk_chain_collapsed: span ctxt = {:?}", span.ctxt());
while !span.eq_ctxt(to) && span.from_expansion() {
let outer_expn = self.outer_expn(span.ctxt());
@ -477,7 +480,7 @@ impl HygieneData {
let expn_data = self.expn_data(outer_expn);
debug!("walk_chain_collapsed({:?}): expn_data={:?}", span, expn_data);
span = expn_data.call_site;
if !collapse_debuginfo_enabled || expn_data.collapse_debuginfo {
if !collapse_debuginfo_feature_enabled || expn_data.collapse_debuginfo {
ret_span = span;
}
}
@ -601,8 +604,14 @@ pub fn walk_chain(span: Span, to: SyntaxContext) -> Span {
HygieneData::with(|data| data.walk_chain(span, to))
}
pub fn walk_chain_collapsed(span: Span, to: Span, collapse_debuginfo_enabled: bool) -> Span {
HygieneData::with(|hdata| hdata.walk_chain_collapsed(span, to, collapse_debuginfo_enabled))
pub fn walk_chain_collapsed(
span: Span,
to: Span,
collapse_debuginfo_feature_enabled: bool,
) -> Span {
HygieneData::with(|hdata| {
hdata.walk_chain_collapsed(span, to, collapse_debuginfo_feature_enabled)
})
}
pub fn update_dollar_crate_names(mut get_name: impl FnMut(SyntaxContext) -> Symbol) {