about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-29 08:06:03 +0000
committerbors <bors@rust-lang.org>2022-12-29 08:06:03 +0000
commit11a338ab6644cf454c45d2b41651900610a55b07 (patch)
tree648b80e1deca9f72c62d397fa0373e88fcfb1c29 /compiler/rustc_span/src
parent6ad83834515912c5e529e0e9fe326d5060d937cf (diff)
parentedc73f97190b4ee9c47933282c416d492f089dab (diff)
downloadrust-11a338ab6644cf454c45d2b41651900610a55b07.tar.gz
rust-11a338ab6644cf454c45d2b41651900610a55b07.zip
Auto merge of #106139 - cjgillot:mir-inline-location, r=eholk
Give the correct track-caller location with MIR inlining.

Fixes https://github.com/rust-lang/rust/issues/105538
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/hygiene.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs
index c2d8287f243..7d1443559fe 100644
--- a/compiler/rustc_span/src/hygiene.rs
+++ b/compiler/rustc_span/src/hygiene.rs
@@ -316,6 +316,7 @@ impl ExpnId {
             // Stop going up the backtrace once include! is encountered
             if expn_data.is_root()
                 || expn_data.kind == ExpnKind::Macro(MacroKind::Bang, sym::include)
+                || expn_data.kind == ExpnKind::Inlined
             {
                 break;
             }