about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/terminator.rs
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2024-01-12 08:21:42 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2024-01-15 19:07:11 +0100
commit16ba56c24238b2f44e0a97da760c83d8795abd80 (patch)
tree7b6b595de31dc60239c669591f3231a6648b7840 /compiler/rustc_const_eval/src/interpret/terminator.rs
parent924ea05103da3bd25e6021535615ca7f8b9ec76d (diff)
downloadrust-16ba56c24238b2f44e0a97da760c83d8795abd80.tar.gz
rust-16ba56c24238b2f44e0a97da760c83d8795abd80.zip
compiler: Lower fn call arg spans down to MIR
To enable improved accuracy of diagnostics in upcoming commits.
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/terminator.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/terminator.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs
index 2358caffc9b..7b993279f18 100644
--- a/compiler/rustc_const_eval/src/interpret/terminator.rs
+++ b/compiler/rustc_const_eval/src/interpret/terminator.rs
@@ -9,7 +9,7 @@ use rustc_middle::{
         AdtDef, Instance, Ty,
     },
 };
-use rustc_span::sym;
+use rustc_span::{source_map::Spanned, sym};
 use rustc_target::abi::{self, FieldIdx};
 use rustc_target::abi::{
     call::{ArgAbi, FnAbi, PassMode},
@@ -242,13 +242,13 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
     /// Evaluate the arguments of a function call
     pub(super) fn eval_fn_call_arguments(
         &self,
-        ops: &[mir::Operand<'tcx>],
+        ops: &[Spanned<mir::Operand<'tcx>>],
     ) -> InterpResult<'tcx, Vec<FnArg<'tcx, M::Provenance>>> {
         ops.iter()
             .map(|op| {
-                Ok(match op {
+                Ok(match &op.node {
                     mir::Operand::Move(place) => FnArg::InPlace(self.eval_place(*place)?),
-                    _ => FnArg::Copy(self.eval_operand(op, None)?),
+                    _ => FnArg::Copy(self.eval_operand(&op.node, None)?),
                 })
             })
             .collect()