@@ -59,6 +59,7 @@ use crate::{
59
59
generics:: Generics ,
60
60
infer:: { coerce:: CoerceMany , unify:: InferenceTable } ,
61
61
lower:: ImplTraitLoweringMode ,
62
+ mir:: MirSpan ,
62
63
to_assoc_type_id,
63
64
traits:: FnTrait ,
64
65
utils:: { InTypeConstIdMetadata , UnevaluatedConstEvaluatorFolder } ,
@@ -553,6 +554,8 @@ pub(crate) struct InferenceContext<'a> {
553
554
554
555
// fields related to closure capture
555
556
current_captures : Vec < CapturedItemWithoutTy > ,
557
+ /// A stack that has an entry for each projection in the current capture.
558
+ current_capture_span_stack : Vec < MirSpan > ,
556
559
current_closure : Option < ClosureId > ,
557
560
/// Stores the list of closure ids that need to be analyzed before this closure. See the
558
561
/// comment on `InferenceContext::sort_closures`
@@ -629,6 +632,7 @@ impl<'a> InferenceContext<'a> {
629
632
breakables : Vec :: new ( ) ,
630
633
deferred_cast_checks : Vec :: new ( ) ,
631
634
current_captures : Vec :: new ( ) ,
635
+ current_capture_span_stack : Vec :: new ( ) ,
632
636
current_closure : None ,
633
637
deferred_closures : FxHashMap :: default ( ) ,
634
638
closure_dependencies : FxHashMap :: default ( ) ,
0 commit comments