about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-05-25 13:58:02 -0700
committerGitHub <noreply@github.com>2023-05-25 13:58:02 -0700
commit2f250c73ba87cb95ea073abe856a5bacf68d6306 (patch)
tree4a8ac0e29b7ef6392c68ae78170824f06f1f76dc
parente6d1a0ed95efaabdb42e605feb6008369ff75c8d (diff)
parentf9dabd8b883bc6deed043ff01180f8c728fdb829 (diff)
downloadrust-2f250c73ba87cb95ea073abe856a5bacf68d6306.tar.gz
rust-2f250c73ba87cb95ea073abe856a5bacf68d6306.zip
Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obk
Remove ExpnKind::Inlined.

Suggested in https://github.com/rust-lang/rust/pull/111815#issuecomment-1561903339

r? ``@oli-obk``
-rw-r--r--src/common.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/common.rs b/src/common.rs
index ccb3a0c4f27..5eaa988dd09 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -413,11 +413,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
 
     // Note: must be kept in sync with get_caller_location from cg_ssa
     pub(crate) fn get_caller_location(&mut self, mut source_info: mir::SourceInfo) -> CValue<'tcx> {
-        let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, mut span: Span| {
-            // Remove `Inlined` marks as they pollute `expansion_cause`.
-            while span.is_inlined() {
-                span.remove_mark();
-            }
+        let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, span: Span| {
             let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
             let caller = fx.tcx.sess.source_map().lookup_char_pos(topmost.lo());
             let const_loc = fx.tcx.const_caller_location((