Open
Description
I'm having some issues when mocking with lifetimes and generics.
This is the example:
struct S<'a> {
arg: &'a str,
}
trait MyTrait {
fn myfunc<'a, C: std::fmt::Debug + Send + Sync + 'static>(
&self,
arg: S<'a>,
ctx: &C,
);
}
mock! {
MyStruct {}
impl MyTrait for MyStruct {
fn myfunc<'a, C: std::fmt::Debug + Send + Sync + 'static>(
&self,
arg: S<'a>,
ctx: &C,
);
}
}
The error is:
But if I simplify the trait, there is no error at all
trait MyTrait2 {
fn myfunc<'a>(
&self,
arg: S<'a>,
);
}
mock! {
MyStruct2 {}
impl MyTrait2 for MyStruct2 {
fn myfunc<'a>(
&self,
arg: S<'a>,
);
}
}