Skip to content

Commit

Permalink
Remove PartialOrd, Ord from AdtDefData
Browse files Browse the repository at this point in the history
This implementation is unused.

Helps with rust-lang#90317.
  • Loading branch information
pierwill committed Jul 5, 2022
1 parent 54f79ba commit 13a3d18
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions compiler/rustc_middle/src/ty/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,6 @@ pub struct AdtDefData {
repr: ReprOptions,
}

impl PartialOrd for AdtDefData {
fn partial_cmp(&self, other: &AdtDefData) -> Option<Ordering> {
Some(self.cmp(&other))
}
}

/// There should be only one AdtDef for each `did`, therefore
/// it is fine to implement `Ord` only based on `did`.
impl Ord for AdtDefData {
fn cmp(&self, other: &AdtDefData) -> Ordering {
self.did.cmp(&other.did)
}
}

/// There should be only one AdtDef for each `did`, therefore
/// it is fine to implement `PartialEq` only based on `did`.
impl PartialEq for AdtDefData {
Expand Down

0 comments on commit 13a3d18

Please sign in to comment.