Skip to content

Commit edf14d1

Browse files
committed
extract places_conflict into its own module
1 parent 142c98d commit edf14d1

File tree

3 files changed

+379
-362
lines changed

3 files changed

+379
-362
lines changed

src/librustc_mir/borrow_check/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ mod flows;
6060
mod location;
6161
mod path_utils;
6262
crate mod place_ext;
63+
mod places_conflict;
6364
mod prefixes;
6465
mod used_muts;
6566

@@ -1307,7 +1308,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
13071308
// that is merged.
13081309
let sd = if might_be_alive { Deep } else { Shallow(None) };
13091310

1310-
if places_conflict(self.tcx, self.mir, place, root_place, sd) {
1311+
if places_conflict::places_conflict(self.tcx, self.mir, place, root_place, sd) {
13111312
debug!("check_for_invalidation_at_exit({:?}): INVALID", place);
13121313
// FIXME: should be talking about the region lifetime instead
13131314
// of just a span here.
@@ -1398,7 +1399,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
13981399
for i in flow_state.ever_inits.iter_incoming() {
13991400
let init = self.move_data.inits[i];
14001401
let init_place = &self.move_data.move_paths[init.path].place;
1401-
if places_conflict(self.tcx, self.mir, &init_place, place, Deep) {
1402+
if places_conflict::places_conflict(self.tcx, self.mir, &init_place, place, Deep) {
14021403
self.report_illegal_reassignment(context, (place, span), init.span, err_place);
14031404
break;
14041405
}

0 commit comments

Comments
 (0)