Closed WilliamVenner closed 1 year ago
mock! { pub Foo {} impl Bar for Foo { fn baz<'a, T: Qux + 'a>(&self); } } error[E0261]: use of undeclared lifetime name `'a` --> src/tests/mocks/mod.rs:8:29 | 8 | fn baz<'a, T: Qux + 'a>(&self); | - ^^ undeclared lifetime | | | help: consider introducing lifetime `'a` here: `'a,` ... 51 | } | - lifetime `'a` is missing in item created through this procedural macro
Using where does not workaround the issue.
where
This is a documented limitation. See https://docs.rs/mockall/latest/mockall/#methods-with-generic-lifetime .
Using
where
does not workaround the issue.