summaryrefslogtreecommitdiff
path: root/macros/src/util.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-03-19 16:29:23 +0100
committerHampusM <hampus@hampusmat.com>2023-03-19 16:54:57 +0100
commitad2a6d1dc517407939ed022bba9f3352efc678ce (patch)
tree8bf7acc6cd79f2d686865832a3b44adb22c01d60 /macros/src/util.rs
parent657673f4a25a2a7299d3751d54d9597635bc529d (diff)
feat: add call count expectations to expectations
Diffstat (limited to 'macros/src/util.rs')
-rw-r--r--macros/src/util.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/macros/src/util.rs b/macros/src/util.rs
index 363051f..43779c1 100644
--- a/macros/src/util.rs
+++ b/macros/src/util.rs
@@ -14,7 +14,18 @@ macro_rules! create_path {
($($segment: ident)::+) => {
Path::new(
WithLeadingColons::No,
- [$(PathSegment::new(format_ident!(stringify!($segment)), None))+],
+ [$(
+ PathSegment::new(format_ident!(stringify!($segment)), None)
+ ),+],
+ )
+ };
+
+ (::$($segment: ident)::+) => {
+ ::syn::Path::new(
+ WithLeadingColons::Yes,
+ [$(
+ ::syn::PathSegment::new(format_ident!(stringify!($segment)), None)
+ ),+],
)
};
}