1
Fork 0

compiler: Lower fn call arg spans down to MIR

To enable improved accuracy of diagnostics in upcoming commits.
This commit is contained in:
Martin Nordholts 2024-01-12 08:21:42 +01:00
parent 924ea05103
commit 16ba56c242
47 changed files with 221 additions and 170 deletions

View file

@ -9,7 +9,7 @@ use rustc_target::abi::{FieldIdx, VariantIdx, FIRST_VARIANT};
use rustc_index::{Idx, IndexVec};
use rustc_span::Span;
use rustc_span::{source_map::Spanned, Span, DUMMY_SP};
use rustc_target::spec::abi::Abi;
use std::fmt;
@ -526,7 +526,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
vec![statement],
TerminatorKind::Call {
func,
args: vec![Operand::Move(ref_loc)],
args: vec![Spanned { node: Operand::Move(ref_loc), span: DUMMY_SP }],
destination: dest,
target: Some(next),
unwind: UnwindAction::Cleanup(cleanup),
@ -811,6 +811,7 @@ fn build_call_shim<'tcx>(
};
// BB #0
let args = args.into_iter().map(|a| Spanned { node: a, span: DUMMY_SP }).collect::<Vec<_>>();
block(
&mut blocks,
statements,