Link to the NEWS file from rustdoc.

This commit is contained in:
KAMADA Ken'ichi 2021-08-01 23:40:11 +09:00
parent 5b9bc48ba6
commit d65ccedc22
1 changed files with 18 additions and 0 deletions

View File

@ -26,6 +26,24 @@
//! Documentation
// Rust 1.54 stabilized invoking function-like macros in attributes.
// We will use it after bumping MSRV.
// #![feature(extended_key_value_attributes)],
// #[doc = include_str!("../NEWS")]
// pub mod news {}
macro_rules! doc_module_with_external_source {
($( #[$attr:meta] )*
$name: ident, $doc: expr) => {
$( #[$attr] )*
#[doc = ""]
#[doc = $doc]
pub mod $name {}
}
}
doc_module_with_external_source!(
/// # News
news, include_str!("../NEWS"));
/// # Upgrade Guide
///
/// ## Upgrade from 0.4.x to 0.5.x