[−][src]Attribute Macro doc_comment::doc_comment
#[doc_comment]
ⓘThis code runs with edition 2018
use doc_comment::doc_comment as dc; #[dc("the foo function!")] pub fn foo() {} #[dc("enum ", "time!")] #[derive(Debug)] pub enum Foo { #[doc_comment("variant ", 1)] A, #[doc_comment("variant ", 2, hello)] B, }
Unfortunately, due to current rust limitations, you can't use it as an inner attribute yet (you can check the issue here):
ⓘThis example is not tested
pub mod bar { #![dc("yolo")] // not working! }