-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Not sure if this is possible to handle currently but mockall doesn't seem able to handle lifetimes on a structure within a mock! macro call (see below)
mock! {
pub Foo<'a> {
pub fn new(value: SomeType<'a>) -> Self;
}
}
The above will give you that 'a is an undeclared lifetime no matter how you do it (you can do it on the function only but In my case Im using mockall double so places in my codebase break as its expecting the mock to take in a lifetime too but it doesn't)
I also can't use automock (which I think can handle this case) as I need a custom name and I need to be able to handle deriving inherited traits like Clone.
If this is something that isn't supported Im happy to look into it with a point in the right direction. (Assuming its feasible)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request