From 5620f6d2445c4b699c7cfa9020a2e9813a13a05c Mon Sep 17 00:00:00 2001 From: ljedrz Date: Tue, 16 Oct 2018 15:33:03 +0200 Subject: [PATCH] mir/borrowck: remove a redundant clone --- src/librustc_mir/borrow_check/error_reporting.rs | 4 +--- 1 file changed, 1 insertion(+), 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 @@ pub(super) fn report_use_of_moved_or_uninitialized( 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 -- 2.44.0