Skip to content

Commit 2f250c7

Browse files
Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obk
Remove ExpnKind::Inlined. Suggested in rust-lang/rust#111815 (comment) r? ``@oli-obk``
2 parents e6d1a0e + f9dabd8 commit 2f250c7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/common.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
413413

414414
// Note: must be kept in sync with get_caller_location from cg_ssa
415415
pub(crate) fn get_caller_location(&mut self, mut source_info: mir::SourceInfo) -> CValue<'tcx> {
416-
let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, mut span: Span| {
417-
// Remove `Inlined` marks as they pollute `expansion_cause`.
418-
while span.is_inlined() {
419-
span.remove_mark();
420-
}
416+
let span_to_caller_location = |fx: &mut FunctionCx<'_, '_, 'tcx>, span: Span| {
421417
let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
422418
let caller = fx.tcx.sess.source_map().lookup_char_pos(topmost.lo());
423419
let const_loc = fx.tcx.const_caller_location((

0 commit comments

Comments
 (0)