Auto merge of #76931 - oli-obk:const_prop_inline_lint_madness, r=wesleywiser

Properly handle lint spans after MIR inlining

The first commit shows what happens when we apply mir inlining and then cause lints on the inlined MIR.
The second commit fixes that.

r? `@wesleywiser`
This commit is contained in:
bors 2020-11-03 16:32:34 +00:00
commit 5cdf5b882d
40 changed files with 400 additions and 350 deletions

View file

@ -766,6 +766,8 @@ pub enum ExpnKind {
AstPass(AstPass),
/// Desugaring done by the compiler during HIR lowering.
Desugaring(DesugaringKind),
/// MIR inlining
Inlined,
}
impl ExpnKind {
@ -779,6 +781,7 @@ impl ExpnKind {
},
ExpnKind::AstPass(kind) => kind.descr().to_string(),
ExpnKind::Desugaring(kind) => format!("desugaring of {}", kind.descr()),
ExpnKind::Inlined => "inlined source".to_string(),
}
}
}