@@ -79,7 +79,7 @@ crate struct PlaceBuilder<'tcx> {
79
79
/// part of a path that is captued by a closure. We stop applying projections once we see the first
80
80
/// projection that isn't captured by a closure.
81
81
fn convert_to_hir_projections_and_truncate_for_capture < ' tcx > (
82
- mir_projections : & Vec < PlaceElem < ' tcx > > ,
82
+ mir_projections : & [ PlaceElem < ' tcx > ] ,
83
83
) -> Vec < HirProjectionKind > {
84
84
85
85
let mut hir_projections = Vec :: new ( ) ;
@@ -128,7 +128,7 @@ fn convert_to_hir_projections_and_truncate_for_capture<'tcx>(
128
128
/// list are being applied to the same root variable.
129
129
fn is_ancestor_or_same_capture (
130
130
proj_possible_ancestor : & Vec < HirProjectionKind > ,
131
- proj_capture : & Vec < HirProjectionKind > ,
131
+ proj_capture : & [ HirProjectionKind ] ,
132
132
) -> bool {
133
133
// We want to make sure `is_ancestor_or_same_capture("x.0.0", "x.0")` to return false.
134
134
// 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>(
171
171
typeck_results : & ' a ty:: TypeckResults < ' tcx > ,
172
172
var_hir_id : HirId ,
173
173
closure_def_id : DefId ,
174
- projections : & Vec < PlaceElem < ' tcx > > ,
174
+ projections : & [ PlaceElem < ' tcx > ] ,
175
175
) -> Option < ( usize , & ' a ty:: CapturedPlace < ' tcx > ) > {
176
176
let closure_min_captures = typeck_results. closure_min_captures . get ( & closure_def_id) ?;
177
177
let root_variable_min_captures = closure_min_captures. get ( & var_hir_id) ?;
0 commit comments