diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-28 09:49:57 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-28 09:49:57 +0000 |
| commit | ba0ab0a830466e07e72adc695797dc2adbfb7205 (patch) | |
| tree | 5468c367b2be0b00af19430d0d83de8c1d2f65a0 | |
| parent | 38b4b985984d6af2a2face7fef2e9b6c80be13d4 (diff) | |
| parent | be82095e1ca0519187805647449aec8585be488e (diff) | |
| download | rust-ba0ab0a830466e07e72adc695797dc2adbfb7205.tar.gz rust-ba0ab0a830466e07e72adc695797dc2adbfb7205.zip | |
Sync from rust cca7ee58110726983951a19d5fb7316d9243925d
| -rw-r--r-- | src/base.rs | 2 | ||||
| -rw-r--r-- | src/common.rs | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/base.rs b/src/base.rs index cf6b0136297..5abb4644e1b 100644 --- a/src/base.rs +++ b/src/base.rs @@ -474,7 +474,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) { | TerminatorKind::GeneratorDrop => { bug!("shouldn't exist at codegen {:?}", bb_data.terminator()); } - TerminatorKind::Drop { place, target, unwind: _ } => { + TerminatorKind::Drop { place, target, unwind: _, replace: _ } => { let drop_place = codegen_place(fx, *place); crate::abi::codegen_drop(fx, source_info, drop_place); diff --git a/src/common.rs b/src/common.rs index 0aeb41b8a3e..dab94d0858c 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(( |
