summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-12 21:01:10 +0100
committerHampusM <hampus@hampusmat.com>2023-03-12 21:01:10 +0100
commitf46a9d7c241b0603a855fca9e67358b2349fd8f0 (patch)
treeb5946361e97e3479fb38c66a4e285a12a936bdb9 /src
parent9e99dbb543ab92762b8c92f1d0ada9c99d7167c9 (diff)
fix: remove need for where clause workaround
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 9f404f1..c4868a2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -11,7 +11,9 @@ macro_rules! mock {
self: ($($self_type: tt)+),
$($func_param: ident: $func_param_type: ty),*
)$( -> $return_type: ty)?
- $(where ($($where: tt)*))?;
+ $(where $(
+ $where_param: ident: $first_where_param_bound: tt $(+ $where_param_bound: tt)*
+ ),*)?;
)*
}
) => {
@@ -45,7 +47,9 @@ macro_rules! mock {
$($type_param$(: $($type_param_bound +)*)?),*
>)?(&mut self)
-> &mut [<$mock Expectation _ $func>]$(<$($type_param),*>)?
- $(where $($where)*)?
+ $(where $(
+ $where_param: $first_where_param_bound $(+ $where_param_bound)*
+ ),*)?
{
let ids = vec![
$($($crate::__private::type_id::TypeID::of::<$type_param>()),*)?
@@ -71,7 +75,9 @@ macro_rules! mock {
self: $($self_type)+,
$($func_param: $func_param_type),*
)$( -> $return_type)?
- $(where $($where)*)?
+ $(where $(
+ $where_param: $first_where_param_bound $(+ $where_param_bound)*
+ ),*)?
{
let ids = vec![
$($($crate::__private::type_id::TypeID::of::<$type_param>()),*)?