@@ -44,7 +44,7 @@ enum Fragment {
44
44
45
45
impl Fragment {
46
46
fn loan_path_repr < ' tcx > ( & self , move_data : & MoveData < ' tcx > , tcx : & ty:: ctxt < ' tcx > ) -> String {
47
- let repr = |mpi| move_data. path_loan_path ( mpi) . repr ( tcx) ;
47
+ let repr = |& : mpi| move_data. path_loan_path ( mpi) . repr ( tcx) ;
48
48
match * self {
49
49
Just ( mpi) => repr ( mpi) ,
50
50
AllButOneFrom ( mpi) => format ! ( "$(allbutone {})" , repr( mpi) ) ,
@@ -54,7 +54,7 @@ impl Fragment {
54
54
fn loan_path_user_string < ' tcx > ( & self ,
55
55
move_data : & MoveData < ' tcx > ,
56
56
tcx : & ty:: ctxt < ' tcx > ) -> String {
57
- let user_string = |mpi| move_data. path_loan_path ( mpi) . user_string ( tcx) ;
57
+ let user_string = |& : mpi| move_data. path_loan_path ( mpi) . user_string ( tcx) ;
58
58
match * self {
59
59
Just ( mpi) => user_string ( mpi) ,
60
60
AllButOneFrom ( mpi) => format ! ( "$(allbutone {})" , user_string( mpi) ) ,
@@ -140,9 +140,9 @@ pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
140
140
141
141
if !span_err && !print { return ; }
142
142
143
- let instrument_all_paths = |kind, vec_rc : & Vec < MovePathIndex > | {
143
+ let instrument_all_paths = |& : kind, vec_rc : & Vec < MovePathIndex > | {
144
144
for ( i, mpi) in vec_rc. iter ( ) . enumerate ( ) {
145
- let render = || this. path_loan_path ( * mpi) . user_string ( tcx) ;
145
+ let render = |& : | this. path_loan_path ( * mpi) . user_string ( tcx) ;
146
146
if span_err {
147
147
tcx. sess . span_err ( sp, format ! ( "{}: `{}`" , kind, render( ) ) [ ] ) ;
148
148
}
@@ -152,9 +152,9 @@ pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
152
152
}
153
153
} ;
154
154
155
- let instrument_all_fragments = |kind, vec_rc : & Vec < Fragment > | {
155
+ let instrument_all_fragments = |& : kind, vec_rc : & Vec < Fragment > | {
156
156
for ( i, f) in vec_rc. iter ( ) . enumerate ( ) {
157
- let render = || f. loan_path_user_string ( this, tcx) ;
157
+ let render = |& : | f. loan_path_user_string( this, tcx) ;
158
158
if span_err {
159
159
tcx. sess . span_err ( sp, format ! ( "{}: `{}`" , kind, render( ) ) [ ] ) ;
160
160
}
@@ -187,11 +187,11 @@ pub fn fixup_fragment_sets<'tcx>(this: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) {
187
187
let mut moved = mem:: replace ( & mut fragments. moved_leaf_paths , vec ! [ ] ) ;
188
188
let mut assigned = mem:: replace ( & mut fragments. assigned_leaf_paths , vec ! [ ] ) ;
189
189
190
- let path_lps = |mpis : & [ MovePathIndex ] | -> Vec < String > {
190
+ let path_lps = |& : mpis: & [ MovePathIndex ] | -> Vec < String > {
191
191
mpis. iter ( ) . map ( |mpi| this. path_loan_path ( * mpi) . repr ( tcx) ) . collect ( )
192
192
} ;
193
193
194
- let frag_lps = |fs : & [ Fragment ] | -> Vec < String > {
194
+ let frag_lps = |& : fs: & [ Fragment ] | -> Vec < String > {
195
195
fs. iter ( ) . map ( |f| f. loan_path_repr ( this, tcx) ) . collect ( )
196
196
} ;
197
197
@@ -344,7 +344,7 @@ fn add_fragment_siblings_for_extension<'tcx>(this: &MoveData<'tcx>,
344
344
Rc < LoanPath < ' tcx > > ) > ) {
345
345
let parent_ty = parent_lp. to_type ( ) ;
346
346
347
- let add_fragment_sibling_local = |field_name, variant_did| {
347
+ let mut add_fragment_sibling_local = |& mut : field_name, variant_did| {
348
348
add_fragment_sibling_core (
349
349
this, tcx, gathered_fragments, parent_lp. clone ( ) , mc, field_name, origin_lp,
350
350
variant_did) ;
0 commit comments