1
Fork 0

Remove PartialOrd/Ord impl for PlaceRef

This is a new attempt at #93315. It removes one usage
of the `Ord` impl for `DefId`, which should make it easier
to eventually remove that impl.
This commit is contained in:
Aaron Hill 2022-05-09 22:48:43 -04:00
parent 08b4f1be33
commit 6b747aa397
No known key found for this signature in database
GPG key ID: B4087E510E98B164
4 changed files with 15 additions and 5 deletions

View file

@ -11,7 +11,7 @@ use crate::build::ForGuard::{self, OutsideGuard, RefWithinGuard};
use crate::build::{BlockAnd, BlockAndExtension, Builder};
use crate::build::{GuardFrame, GuardFrameLocal, LocalsForNode};
use rustc_data_structures::{
fx::{FxIndexMap, FxIndexSet},
fx::{FxHashSet, FxIndexMap, FxIndexSet},
stack::ensure_sufficient_stack,
};
use rustc_hir::HirId;
@ -1741,7 +1741,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
all_fake_borrows.push(place.as_ref());
}
all_fake_borrows.dedup();
// Deduplicate
let mut dedup = FxHashSet::default();
all_fake_borrows.retain(|b| dedup.insert(*b));
debug!("add_fake_borrows all_fake_borrows = {:?}", all_fake_borrows);