diff options
Diffstat (limited to 'tests/test_doc.rs')
-rw-r--r-- | tests/test_doc.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_doc.rs b/tests/test_doc.rs index 1ceaf23..2e2b14d 100644 --- a/tests/test_doc.rs +++ b/tests/test_doc.rs @@ -52,3 +52,26 @@ fn test_case() { let expected = "HTTP GET!"; assert_eq!(doc, expected); } + +// https://github.com/dtolnay/paste/issues/63 +#[test] +fn test_stringify() { + macro_rules! create { + ($doc:expr) => { + paste! { + #[doc = $doc] + pub struct Struct; + } + }; + } + + macro_rules! forward { + ($name:ident) => { + create!(stringify!($name)); + }; + } + + forward!(documentation); + + let _ = Struct; +} |