From 8455bb19b7d4235e667cab9112aa276557969dcc Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 5 Aug 2026 18:44:26 +0100 Subject: Type check generic native types --- examples/12-shared/output/rust/src/lib.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/12-shared/output/rust/src/lib.rs (limited to 'examples/12-shared/output/rust/src/lib.rs') diff --git a/examples/12-shared/output/rust/src/lib.rs b/examples/12-shared/output/rust/src/lib.rs new file mode 100644 index 0000000..af2c87f --- /dev/null +++ b/examples/12-shared/output/rust/src/lib.rs @@ -0,0 +1,14 @@ +mod point; + +#[cfg(test)] +mod test { + use std::sync::Arc; + use super::point::{Line, Point}; + + #[test] + fn line() { + let point = Arc::new(Point { x: 10, y: 25 }); + let line = Line { start: Arc::clone(&point), end: point }; + assert_eq!(line.start.x, 10); + } +} -- cgit v1.2.3