get_docs!() { /* proc-macro */ }
Expand description
Retrieves the doc comments on a function marked with #[function_docs]
.
ยงExamples
/// Adds two integers together and returns them.
#[function_docs]
fn add(a: i32, b: i32) -> i32 {
a + b
}
fn main() {
assert_eq!(get_docs!(add), "Adds two integers together and returns them.");
}