diff options
| author | Martin Nordholts <martin.nordholts@codetale.se> | 2024-01-12 08:21:42 +0100 | 
|---|---|---|
| committer | Martin Nordholts <martin.nordholts@codetale.se> | 2024-01-15 19:07:11 +0100 | 
| commit | 16ba56c24238b2f44e0a97da760c83d8795abd80 (patch) | |
| tree | 7b6b595de31dc60239c669591f3231a6648b7840 /compiler/rustc_middle/src/mir/syntax.rs | |
| parent | 924ea05103da3bd25e6021535615ca7f8b9ec76d (diff) | |
| download | rust-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_middle/src/mir/syntax.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 462076d750f..6ebe57e29da 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -16,6 +16,7 @@ use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece}; use rustc_hir::def_id::DefId; use rustc_hir::{self, CoroutineKind}; use rustc_index::IndexVec; +use rustc_span::source_map::Spanned; use rustc_target::abi::{FieldIdx, VariantIdx}; use rustc_ast::Mutability; @@ -673,7 +674,9 @@ pub enum TerminatorKind<'tcx> { /// These are owned by the callee, which is free to modify them. /// This allows the memory occupied by "by-value" arguments to be /// reused across function calls without duplicating the contents. - args: Vec<Operand<'tcx>>, + /// The span for each arg is also included + /// (e.g. `a` and `b` in `x.foo(a, b)`). + args: Vec<Spanned<Operand<'tcx>>>, /// Where the returned value will be written destination: Place<'tcx>, /// Where to go after this call returns. If none, the call necessarily diverges. | 
