From ca0af8164bbc5f773b7c458945b5d1eccd8bee5d Mon Sep 17 00:00:00 2001 From: Robert Simmons Jr Date: Sat, 17 Aug 2019 20:13:05 -0500 Subject: [PATCH] Putting in test for issue #4 --- src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8f73cfe..1d4e40c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -834,6 +834,18 @@ mod tests { F, } + #[test] + fn test_clone_with_unclonable() { + // Issue #4 Prevents #[derive(Clone)] from being used because of a rust bug that + // thinks it needs to clone the T type and required manual cloning. If not fixed this + // test wouldn't compile. + struct Unclonable {} + + let (sender, receiver) = create::(5, 10); + let _s_clone = sender.clone(); + let _r_clone = receiver.clone(); + } + #[test] fn test_send_and_receive() { init_test_log();