diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-10-16 15:33:03 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-10-17 14:40:47 +0200 |
| commit | 5620f6d2445c4b699c7cfa9020a2e9813a13a05c (patch) | |
| tree | cc19b1e9aa41cbf55fe8799a6eecc052f309b8d6 | |
| parent | f53d2b257cfef3e02192f2735924aaf1223818a0 (diff) | |
| download | rust-5620f6d2445c4b699c7cfa9020a2e9813a13a05c.tar.gz rust-5620f6d2445c4b699c7cfa9020a2e9813a13a05c.zip | |
mir/borrowck: remove a redundant clone
| -rw-r--r-- | src/librustc_mir/borrow_check/error_reporting.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_mir/borrow_check/error_reporting.rs b/src/librustc_mir/borrow_check/error_reporting.rs index 06918d9ebab..759b842e9df 100644 --- a/src/librustc_mir/borrow_check/error_reporting.rs +++ b/src/librustc_mir/borrow_check/error_reporting.rs @@ -77,9 +77,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> { if move_out_indices.is_empty() { let root_place = self.prefixes(&used_place, PrefixSet::All).last().unwrap(); - if self.uninitialized_error_reported - .contains(&root_place.clone()) - { + if self.uninitialized_error_reported.contains(root_place) { debug!( "report_use_of_moved_or_uninitialized place: error about {:?} suppressed", root_place |
