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:
parent
08b4f1be33
commit
6b747aa397
4 changed files with 15 additions and 5 deletions
|
@ -2084,12 +2084,18 @@ rustc_index::newtype_index! {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct PlaceRef<'tcx> {
|
||||
pub local: Local,
|
||||
pub projection: &'tcx [PlaceElem<'tcx>],
|
||||
}
|
||||
|
||||
// Once we stop implementing `Ord` for `DefId`,
|
||||
// this impl will be unnecessary. Until then, we'll
|
||||
// leave this impl in place to prevent re-adding a
|
||||
// dependnecy on the `Ord` impl for `DefId`
|
||||
impl<'tcx> !PartialOrd for PlaceRef<'tcx> {}
|
||||
|
||||
impl<'tcx> Place<'tcx> {
|
||||
// FIXME change this to a const fn by also making List::empty a const fn.
|
||||
pub fn return_place() -> Place<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue