File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 347
347
// TODO: turn on before releasing :) Will require adding documentation within all REST API specs
348
348
// #![deny(missing_docs)]
349
349
350
- // also test examples in README when using rust nightly.
351
- // required as external_doc feature requires nightly
352
- #![ cfg_attr( RUSTC_IS_NIGHTLY , feature( external_doc) ) ]
353
- #[ cfg_attr( RUSTC_IS_NIGHTLY , doc( include = "../../README.md" ) , cfg( doctest) ) ]
354
- type _DoctestReadme = ( ) ;
350
+ // also test examples in README
351
+ // source: https://github.com/rust-lang/cargo/issues/383#issuecomment-720873790
352
+ #[ cfg( doctest) ]
353
+ mod readme {
354
+ macro_rules! external_doc_test {
355
+ ( $x: expr) => {
356
+ #[ doc = $x]
357
+ extern "C" { }
358
+ } ;
359
+ }
360
+
361
+ external_doc_test ! ( include_str!( "../../README.md" ) ) ;
362
+ }
355
363
356
364
#[ macro_use]
357
365
extern crate dyn_clone;
You can’t perform that action at this time.
0 commit comments