blob: f7b46525d9f7a6ee88fdfcd3185c21d0f317f45b [file] [log] [blame]
#[cfg(feature = "with_proc_macro")]
use rustdoc_proc_macro::make_answer;
#[cfg(feature = "with_proc_macro")]
make_answer!();
/// The answer to the ultimate question
/// ```
/// fn answer() -> u32 { 42 }
/// assert_eq!(answer(), 42);
/// ```
#[cfg(not(feature = "with_proc_macro"))]
pub fn answer() -> u32 {
42
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_answer() {
assert_eq!(answer(), 42);
}
}