From cf9d93a5d60163db1169f0a3369f8871feab2b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 1 Jul 2021 14:10:57 +0300 Subject: [PATCH] Don't implement Eq for CrateGraph --- crates/base_db/src/input.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 0c51a59a0f0..0b80e9e47d7 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs @@ -67,7 +67,7 @@ impl SourceRoot { /// Note that `CrateGraph` is build-system agnostic: it's a concept of the Rust /// language proper, not a concept of the build system. In practice, we get /// `CrateGraph` by lowering `cargo metadata` output. -#[derive(Debug, Clone, Default, PartialEq, Eq)] +#[derive(Debug, Clone, Default)] pub struct CrateGraph { arena: FxHashMap, } @@ -170,14 +170,7 @@ pub struct ProcMacro { pub expander: Arc, } -impl Eq for ProcMacro {} -impl PartialEq for ProcMacro { - fn eq(&self, other: &ProcMacro) -> bool { - self.name == other.name && Arc::ptr_eq(&self.expander, &other.expander) - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone)] pub struct CrateData { pub root_file_id: FileId, pub edition: Edition,