From ad2a6d1dc517407939ed022bba9f3352efc678ce Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 19 Mar 2023 16:29:23 +0100 Subject: feat: add call count expectations to expectations --- macros/src/util.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'macros/src/util.rs') 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) + ),+], ) }; } -- cgit v1.2.3-18-g5258