Skip to content

Commit 00f6c4d

Browse files
committed
Remove the equality impls
1 parent e51b396 commit 00f6c4d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

compiler/rustc_middle/src/ty/consts.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::hash::{Hash, Hasher};
2-
use std::ptr;
32

43
use crate::mir::interpret::ConstValue;
54
use crate::mir::interpret::{LitToConstInput, Scalar};
@@ -21,7 +20,7 @@ pub use kind::*;
2120
pub use valtree::*;
2221

2322
/// Typed constant value.
24-
#[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, Ord, PartialOrd)]
23+
#[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, PartialEq, Eq, Ord, PartialOrd)]
2524
#[derive(HashStable)]
2625
pub struct Const<'tcx> {
2726
pub(super) ty: Ty<'tcx>,
@@ -269,14 +268,6 @@ impl<'tcx> Const<'tcx> {
269268
}
270269
}
271270

272-
impl PartialEq for Const<'tcx> {
273-
fn eq(&self, other: &Self) -> bool {
274-
ptr::eq(self, other)
275-
}
276-
}
277-
278-
impl Eq for Const<'tcx> {}
279-
280271
impl Hash for Const<'tcx> {
281272
fn hash<H: Hasher>(&self, state: &mut H) {
282273
(self as *const Const<'tcx>).hash(state)

0 commit comments

Comments
 (0)