summaryrefslogtreecommitdiff
path: root/examples/automock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/automock.rs')
-rw-r--r--examples/automock.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/automock.rs b/examples/automock.rs
index c8725ce..a597678 100644
--- a/examples/automock.rs
+++ b/examples/automock.rs
@@ -3,14 +3,22 @@ use ridicule::predicate::{always, eq};
use crate::cool_trais::MockFoo;
+pub trait DoStuff<Thing> {}
+
+impl<TFoo: Foo> DoStuff<TFoo> for f32 {}
+
mod cool_trais
{
use ridicule::automock;
+ use crate::DoStuff;
+
#[automock]
- pub trait Foo
+ pub trait Foo: Sized
{
- fn bar<Something>(&self, num: u128, text: &str) -> Something;
+ fn bar<Something>(&self, num: u128, text: &str) -> Something
+ where
+ Something: DoStuff<Self>;
}
}