@@ -165,7 +165,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
165165 self . consume_operand ( location, value) ;
166166
167167 // Invalidate all borrows of local places
168- let borrow_set = self . borrow_set . clone ( ) ;
168+ let borrow_set = self . borrow_set ;
169169 let resume = self . location_table . start_index ( resume. start_location ( ) ) ;
170170 for ( i, data) in borrow_set. iter_enumerated ( ) {
171171 if borrow_of_local_data ( data. borrowed_place ) {
@@ -177,7 +177,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
177177 }
178178 TerminatorKind :: Resume | TerminatorKind :: Return | TerminatorKind :: GeneratorDrop => {
179179 // Invalidate all borrows of local places
180- let borrow_set = self . borrow_set . clone ( ) ;
180+ let borrow_set = self . borrow_set ;
181181 let start = self . location_table . start_index ( location) ;
182182 for ( i, data) in borrow_set. iter_enumerated ( ) {
183183 if borrow_of_local_data ( data. borrowed_place ) {
@@ -369,15 +369,15 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
369369 ) ;
370370 let tcx = self . tcx ;
371371 let body = self . body ;
372- let borrow_set = self . borrow_set . clone ( ) ;
372+ let borrow_set = self . borrow_set ;
373373 let indices = self . borrow_set . indices ( ) ;
374374 each_borrow_involving_path (
375375 self ,
376376 tcx,
377377 body,
378378 location,
379379 ( sd, place) ,
380- & borrow_set. clone ( ) ,
380+ borrow_set,
381381 indices,
382382 |this, borrow_index, borrow| {
383383 match ( rw, borrow. kind ) {
0 commit comments