@@ -79,7 +79,7 @@ crate struct PlaceBuilder<'tcx> {
7979/// part of a path that is captued by a closure. We stop applying projections once we see the first
8080/// projection that isn't captured by a closure.
8181fn convert_to_hir_projections_and_truncate_for_capture < ' tcx > (
82- mir_projections : & Vec < PlaceElem < ' tcx > > ,
82+ mir_projections : & [ PlaceElem < ' tcx > ] ,
8383) -> Vec < HirProjectionKind > {
8484
8585 let mut hir_projections = Vec :: new ( ) ;
@@ -128,7 +128,7 @@ fn convert_to_hir_projections_and_truncate_for_capture<'tcx>(
128128/// list are being applied to the same root variable.
129129fn is_ancestor_or_same_capture (
130130 proj_possible_ancestor : & Vec < HirProjectionKind > ,
131- proj_capture : & Vec < HirProjectionKind > ,
131+ proj_capture : & [ HirProjectionKind ] ,
132132) -> bool {
133133 // We want to make sure `is_ancestor_or_same_capture("x.0.0", "x.0")` to return false.
134134 // Therefore we can't just check if all projections are same in the zipped iterator below.
@@ -171,7 +171,7 @@ fn find_capture_matching_projections<'a, 'tcx>(
171171 typeck_results : & ' a ty:: TypeckResults < ' tcx > ,
172172 var_hir_id : HirId ,
173173 closure_def_id : DefId ,
174- projections : & Vec < PlaceElem < ' tcx > > ,
174+ projections : & [ PlaceElem < ' tcx > ] ,
175175) -> Option < ( usize , & ' a ty:: CapturedPlace < ' tcx > ) > {
176176 let closure_min_captures = typeck_results. closure_min_captures . get ( & closure_def_id) ?;
177177 let root_variable_min_captures = closure_min_captures. get ( & var_hir_id) ?;
0 commit comments