about summary refs log tree commit diff
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-10-16 15:33:03 +0200
committerljedrz <ljedrz@gmail.com>2018-10-17 14:40:47 +0200
commit5620f6d2445c4b699c7cfa9020a2e9813a13a05c (patch)
treecc19b1e9aa41cbf55fe8799a6eecc052f309b8d6
parentf53d2b257cfef3e02192f2735924aaf1223818a0 (diff)
downloadrust-5620f6d2445c4b699c7cfa9020a2e9813a13a05c.tar.gz
rust-5620f6d2445c4b699c7cfa9020a2e9813a13a05c.zip
mir/borrowck: remove a redundant clone
-rw-r--r--src/librustc_mir/borrow_check/error_reporting.rs4
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