1
Fork 0

Show the inline stack of MIR lints that only occur after inlining

This commit is contained in:
Oliver Scherer 2020-09-19 18:56:32 +02:00 committed by oli
parent 4445e46518
commit c8a866ea17
40 changed files with 378 additions and 353 deletions

View file

@ -296,7 +296,7 @@ pub trait Emitter {
// Skip past non-macro entries, just in case there
// are some which do actually involve macros.
ExpnKind::Desugaring(..) | ExpnKind::AstPass(..) => None,
ExpnKind::Inlined | ExpnKind::Desugaring(..) | ExpnKind::AstPass(..) => None,
ExpnKind::Macro(macro_kind, _) => Some(macro_kind),
}
@ -356,7 +356,9 @@ pub trait Emitter {
continue;
}
if always_backtrace {
if matches!(trace.kind, ExpnKind::Inlined) {
new_labels.push((trace.call_site, "in the inlined copy of this".to_string()));
} else if always_backtrace {
new_labels.push((
trace.def_site,
format!(