Skip to content

Commit

Permalink
Rollup merge of rust-lang#111950 - cjgillot:expn-noinline, r=oli-obk
Browse files Browse the repository at this point in the history
Remove ExpnKind::Inlined.

Suggested in rust-lang#111815 (comment)

r? ``@oli-obk``
  • Loading branch information
compiler-errors authored May 25, 2023
2 parents e6d1a0e + f9dabd8 commit 2f250c7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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((
Expand Down

0 comments on commit 2f250c7

Please sign in to comment.