diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-09-19 18:56:32 +0200 |
|---|---|---|
| committer | oli <oli@uhura.edef.eu> | 2020-10-27 14:08:07 +0000 |
| commit | c8a866ea176f1d7250a714647a6ce7a4636f5705 (patch) | |
| tree | 44070d82ce7adc4e3ca3e0f29c6ce7eeba8c93c7 /compiler/rustc_errors | |
| parent | 4445e465182f13590fb7c938881ee1225175740d (diff) | |
| download | rust-c8a866ea176f1d7250a714647a6ce7a4636f5705.tar.gz rust-c8a866ea176f1d7250a714647a6ce7a4636f5705.zip | |
Show the inline stack of MIR lints that only occur after inlining
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index b5155f8e910..1922dbef64d 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -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!( |
