summaryrefslogtreecommitdiff
path: root/examples/06-native-type
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-25 19:09:59 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-25 19:09:59 +0100
commit26ab534795dcced8ae6e7b4898b50748b73c930e (patch)
treeabff77bb1a44ed24480350728f8a1046cf3662b2 /examples/06-native-type
parent85d6843940295d4121fbf4313d5381ca9381f365 (diff)
Derive Hash for generated Rust types
Diffstat (limited to 'examples/06-native-type')
-rw-r--r--examples/06-native-type/output/rust/src/gen/point.rs2
-rw-r--r--examples/06-native-type/output/rust/src/point.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/06-native-type/output/rust/src/gen/point.rs b/examples/06-native-type/output/rust/src/gen/point.rs
index e29c94b..d383b15 100644
--- a/examples/06-native-type/output/rust/src/gen/point.rs
+++ b/examples/06-native-type/output/rust/src/gen/point.rs
@@ -1,7 +1,7 @@
// Generated by hobgoblin.
/// A straight line from one point to another.
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Hash, PartialEq)]
pub struct Line {
pub start: crate::point::Point,
pub end: crate::point::Point,
diff --git a/examples/06-native-type/output/rust/src/point.rs b/examples/06-native-type/output/rust/src/point.rs
index 8d7c0bf..c5b73d7 100644
--- a/examples/06-native-type/output/rust/src/point.rs
+++ b/examples/06-native-type/output/rust/src/point.rs
@@ -1,4 +1,4 @@
include!("gen/point.rs");
-#[derive(Debug, PartialEq)]
+#[derive(Debug, Hash, PartialEq)]
pub struct Point(pub i32, pub i32);