From 8629394b2447533791f09622eca548012f577688 Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Mon, 22 Jan 2018 16:48:50 +0100 Subject: [PATCH 1/4] derive Hash for ImplKind --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d7f174b..1be1b26 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -203,7 +203,7 @@ pub struct Impl { pub attributes: Vec, } -#[derive(Debug, RustcDecodable, RustcEncodable, Clone, PartialEq, Eq)] +#[derive(Debug, RustcDecodable, RustcEncodable, Clone, PartialEq, Eq, Hash)] pub enum ImplKind { // impl Foo { ... } Inherent, From 4c2ffb5cb6378bbacbfa7381ebcf074ddb2567aa Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Mon, 22 Jan 2018 16:49:07 +0100 Subject: [PATCH 2/4] id field for Relation --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 1be1b26..8e74589 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,6 +254,7 @@ pub struct Relation { pub kind: RelationKind, pub from: Id, pub to: Id, + pub id: u32, } #[derive(Debug, RustcDecodable, RustcEncodable, Clone, Copy, PartialEq, Eq)] From 5733dbde7bb3895a61df4c4d566b116431a63486 Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Mon, 29 Jan 2018 08:26:31 +0100 Subject: [PATCH 3/4] Revert "derive Hash for ImplKind" This reverts commit 8629394b2447533791f09622eca548012f577688. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8e74589..160c2e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -203,7 +203,7 @@ pub struct Impl { pub attributes: Vec, } -#[derive(Debug, RustcDecodable, RustcEncodable, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, RustcDecodable, RustcEncodable, Clone, PartialEq, Eq)] pub enum ImplKind { // impl Foo { ... } Inherent, From de4198945f0383be8fc6c7870566973072484d9a Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Mon, 29 Jan 2018 08:27:25 +0100 Subject: [PATCH 4/4] move id to RelationKind::Impl --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 160c2e9..8e4c9f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,12 +254,13 @@ pub struct Relation { pub kind: RelationKind, pub from: Id, pub to: Id, - pub id: u32, } #[derive(Debug, RustcDecodable, RustcEncodable, Clone, Copy, PartialEq, Eq)] pub enum RelationKind { - Impl, + Impl { + id: u32, + }, SuperTrait, }