Skip to content

Commit ba0ab0a

Browse files
committed
Sync from rust cca7ee5
2 parents 38b4b98 + be82095 commit ba0ab0a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
474474
| TerminatorKind::GeneratorDrop => {
475475
bug!("shouldn't exist at codegen {:?}", bb_data.terminator());
476476
}
477-
TerminatorKind::Drop { place, target, unwind: _ } => {
477+
TerminatorKind::Drop { place, target, unwind: _, replace: _ } => {
478478
let drop_place = codegen_place(fx, *place);
479479
crate::abi::codegen_drop(fx, source_info, drop_place);
480480

src/common.rs

Lines changed: 1 addition & 5 deletions
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)