diff options
Diffstat (limited to 'tests/test_attr.rs')
-rw-r--r-- | tests/test_attr.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_attr.rs b/tests/test_attr.rs index f2a5bf0..c880eac 100644 --- a/tests/test_attr.rs +++ b/tests/test_attr.rs @@ -43,3 +43,18 @@ fn test_paste_cfg() { let _ = new; } + +#[test] +fn test_path_in_attr() { + macro_rules! m { + (#[x = $x:ty]) => { + stringify!($x) + }; + } + + let ty = paste! { + m!(#[x = foo::Bar]) + }; + + assert_eq!("foo::Bar", ty); +} |