@@ -616,7 +616,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
616
616
reasons
617
617
}
618
618
619
- /// Returns true if migration is needed for trait for the provided var_hir_id
619
+ /// Returns a tuple that contains the hir_id pointing to the use that resulted in the
620
+ /// corresponding place being captured and a String which contains the captured value's name
621
+ /// (i.e: a.b.c) if migration is needed for trait for the provided var_hir_id, otherwise returns None
620
622
fn need_2229_migrations_for_trait (
621
623
& self ,
622
624
min_captures : Option < & ty:: RootVariableMinCaptureList < ' tcx > > ,
@@ -693,12 +695,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
693
695
/// captured by the closure when `capture_disjoint_fields` is enabled and auto-traits
694
696
/// differ between the root variable and the captured paths.
695
697
///
696
- /// The output list would include a root variable if:
697
- /// - It would have been captured into the closure when `capture_disjoint_fields` wasn't
698
- /// enabled, **and**
699
- /// - It wasn't completely captured by the closure, **and**
700
- /// - One of the paths captured does not implement all the auto-traits its root variable
701
- /// implements.
698
+ /// Returns a tuple containing a HashSet of traits that not implemented by the captured fields
699
+ /// of a root variables that has the provided var_hir_id and a HashSet of tuples that contains
700
+ /// the hir_id pointing to the use that resulted in the corresponding place being captured and
701
+ /// a String which contains the captured value's name (i.e: a.b.c) if migration is needed for
702
+ /// trait for the provided var_hir_id, otherwise returns None
702
703
fn compute_2229_migrations_for_trait (
703
704
& self ,
704
705
min_captures : Option < & ty:: RootVariableMinCaptureList < ' tcx > > ,
@@ -788,8 +789,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
788
789
/// - It wasn't completely captured by the closure, **and**
789
790
/// - One of the paths starting at this root variable, that is not captured needs Drop.
790
791
///
791
- /// This function only returns true for significant drops. A type is considerent to have a
792
- /// significant drop if it's Drop implementation is not annotated by `rustc_insignificant_dtor`.
792
+ /// This function only returns a HashSet of tuples for significant drops. The returned HashSet
793
+ /// of tuples contains the hir_id pointing to the use that resulted in the corresponding place
794
+ /// being captured anda String which contains the captured value's name (i.e: a.b.c)
793
795
fn compute_2229_migrations_for_drop (
794
796
& self ,
795
797
closure_def_id : DefId ,
@@ -871,8 +873,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
871
873
/// - One of the paths captured does not implement all the auto-traits its root variable
872
874
/// implements.
873
875
///
874
- /// Returns a tuple containing a vector of HirIds as well as a String containing the reason
875
- /// why root variables whose HirId is contained in the vector should be fully captured.
876
+ /// Returns a tuple containing a vector of tuples of HirIds and a HashSet of tuples that contains
877
+ /// the hir_id pointing to the use that resulted in the corresponding place being captured and
878
+ /// a String which contains the captured value's name (i.e: a.b.c), as well as a String
879
+ /// containing the reason why root variables whose HirId is contained in the vector should
876
880
fn compute_2229_migrations (
877
881
& self ,
878
882
closure_def_id : DefId ,
0 commit comments