Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions elasticsearch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,19 @@
// TODO: turn on before releasing :) Will require adding documentation within all REST API specs
// #![deny(missing_docs)]

// also test examples in README when using rust nightly.
// required as external_doc feature requires nightly
#![cfg_attr(RUSTC_IS_NIGHTLY, feature(external_doc))]
#[cfg_attr(RUSTC_IS_NIGHTLY, doc(include = "../../README.md"), cfg(doctest))]
type _DoctestReadme = ();
// also test examples in README
// source: https://github.com/rust-lang/cargo/issues/383#issuecomment-720873790
#[cfg(doctest)]
mod readme {
macro_rules! external_doc_test {
($x:expr) => {
#[doc = $x]
extern "C" {}
};
}

external_doc_test!(include_str!("../../README.md"));
}

#[macro_use]
extern crate dyn_clone;
Expand Down