]> git.lizzy.rs Git - rust.git/commitdiff
review comment
authorEsteban Küber <esteban@kuber.com.ar>
Wed, 19 Jun 2019 16:25:20 +0000 (09:25 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Wed, 19 Jun 2019 16:25:48 +0000 (09:25 -0700)
src/librustc_mir/borrow_check/mod.rs

index bb089cb4952d52f66b5497704d2a2aa4f3d4637f..839eee5a91f8c1fd9a21618134b1cc1068e70bec 100644 (file)
@@ -1070,7 +1070,7 @@ fn check_access_for_conflict(
 
                 (Reservation(WriteKind::MutableBorrow(bk)), BorrowKind::Shallow)
                 | (Reservation(WriteKind::MutableBorrow(bk)), BorrowKind::Shared) if {
-                    tcx.migrate_borrowck() && this.borrow_set.location_map.get(&location).is_some()
+                    tcx.migrate_borrowck() && this.borrow_set.location_map.contains_key(&location)
                 } => {
                     let bi = this.borrow_set.location_map[&location];
                     debug!(