@@ -165,7 +165,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
165
165
self . consume_operand ( location, value) ;
166
166
167
167
// Invalidate all borrows of local places
168
- let borrow_set = self . borrow_set . clone ( ) ;
168
+ let borrow_set = self . borrow_set ;
169
169
let resume = self . location_table . start_index ( resume. start_location ( ) ) ;
170
170
for ( i, data) in borrow_set. iter_enumerated ( ) {
171
171
if borrow_of_local_data ( data. borrowed_place ) {
@@ -177,7 +177,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
177
177
}
178
178
TerminatorKind :: Resume | TerminatorKind :: Return | TerminatorKind :: GeneratorDrop => {
179
179
// Invalidate all borrows of local places
180
- let borrow_set = self . borrow_set . clone ( ) ;
180
+ let borrow_set = self . borrow_set ;
181
181
let start = self . location_table . start_index ( location) ;
182
182
for ( i, data) in borrow_set. iter_enumerated ( ) {
183
183
if borrow_of_local_data ( data. borrowed_place ) {
@@ -369,15 +369,15 @@ impl<'cx, 'tcx> InvalidationGenerator<'cx, 'tcx> {
369
369
) ;
370
370
let tcx = self . tcx ;
371
371
let body = self . body ;
372
- let borrow_set = self . borrow_set . clone ( ) ;
372
+ let borrow_set = self . borrow_set ;
373
373
let indices = self . borrow_set . indices ( ) ;
374
374
each_borrow_involving_path (
375
375
self ,
376
376
tcx,
377
377
body,
378
378
location,
379
379
( sd, place) ,
380
- & borrow_set. clone ( ) ,
380
+ borrow_set,
381
381
indices,
382
382
|this, borrow_index, borrow| {
383
383
match ( rw, borrow. kind ) {
0 commit comments