Link to the NEWS file from rustdoc.
This commit is contained in:
parent
5b9bc48ba6
commit
d65ccedc22
18
src/doc.rs
18
src/doc.rs
|
@ -26,6 +26,24 @@
|
||||||
|
|
||||||
//! Documentation
|
//! 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 Guide
|
||||||
///
|
///
|
||||||
/// ## Upgrade from 0.4.x to 0.5.x
|
/// ## Upgrade from 0.4.x to 0.5.x
|
||||||
|
|
Loading…
Reference in New Issue