Skip to content

Commit 8807289

Browse files
committed
Simplify the way to include NEWS file in the doc comment.
Rust 1.54 stabilized invoking function-like macros in attributes.
1 parent 30be537 commit 8807289

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

src/doc.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,9 @@
2626

2727
//! Documentation
2828
29-
// Rust 1.54 stabilized invoking function-like macros in attributes.
30-
// We will use it after bumping MSRV.
31-
// #![feature(extended_key_value_attributes)],
32-
// #[doc = include_str!("../NEWS")]
33-
// pub mod news {}
34-
macro_rules! doc_module_with_external_source {
35-
($( #[$attr:meta] )*
36-
$name: ident, $doc: expr) => {
37-
$( #[$attr] )*
38-
#[doc = ""]
39-
#[doc = $doc]
40-
pub mod $name {}
41-
}
42-
}
43-
doc_module_with_external_source!(
44-
/// # News
45-
news, include_str!("../NEWS"));
29+
/// # News
30+
#[doc = include_str!("../NEWS")]
31+
pub mod news {}
4632

4733
/// # Upgrade Guide
4834
///

0 commit comments

Comments
 (0)