dtolnay / paste

Macros for all your token pasting needs
Apache License 2.0
983 stars 53 forks source link

Support ident modifiers in doc #54

Closed pksunkara closed 3 years ago

pksunkara commented 3 years ago

Currently, the following is not possible:

macro_rules! method {
    ($method:ident) => {
    #[doc = " Define an endpoint with path that allows only `" $method:snake:upper "` HTTP method"]
    pub fn $method() {}
    }
}

I looked into implementing it and send a PR but it looks like the doc.rs code is not using anything from lib.rs. I could have just copied the modifier code, but it felt like a hack reducing code quality. So, here I am creating an issue.

dtolnay commented 3 years ago

Implemented in 1.0.2.