Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- macro_rules! put_doc_on_S {
- ($word:ident) => {
- /*
- // does not work:
- #[doc = stringify!($word)]
- pub struct S;
- */
- // works:
- put_doc_on_S_please!(stringify!($word));
- };
- }
- macro_rules! put_doc_on_S_please {
- ($word:expr) => {
- #[doc = $word]
- pub struct S;
- };
- }
- put_doc_on_S!(success);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement