Add a test for doc(include)

Tiny code improvement.
This commit is contained in:
daxpedda 2019-03-14 19:33:06 +01:00
parent 177b3b27c4
commit e1096e3310
No known key found for this signature in database
GPG Key ID: C722DCB6A191EEAB
3 changed files with 6 additions and 3 deletions

View File

@ -53,16 +53,14 @@ impl MissingDoc {
*self.doc_hidden_stack.last().expect("empty doc_hidden_stack")
}
#[allow(clippy::needless_bool)]
fn has_include(meta: Option<MetaItem>) -> bool {
if_chain! {
if let Some(meta) = meta;
if let MetaItemKind::List(list) = meta.node;
if let Some(meta) = list.get(0);
if let Some(name) = meta.name();
if name == "include";
then {
true
name == "include"
} else {
false
}

View File

@ -0,0 +1,5 @@
#![warn(clippy::missing_docs_in_private_items)]
#![feature(external_doc)]
#![doc(include = "../../README.md")]
fn main() {}

View File