Skip to content

Commit

Permalink
WIP: Test code examples in README
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 23, 2019
1 parent df9347c commit 485155f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

A crate for safe and ergonomic pin-projection.

[Documentation](https://docs.rs/pin-project/)
[Documentation][docs-url]

## Usage

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ trigger:
- master
- staging
- trying
- external_doc # WIP

variables:
RUSTFLAGS: -Dwarnings
Expand Down
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@
#![warn(single_use_lifetimes)]
#![warn(clippy::all, clippy::pedantic)]
#![allow(clippy::use_self)]
#![cfg_attr(test, feature(external_doc))]

#[cfg(test)]
mod _doctests {
#[doc(include = "../README.md")]
const _README: () = ();
#[doc(include = "../doc/struct-example-1.md")]
const _STRUCT_EXAMPLE: () = ();
#[doc(include = "../doc/enum-example-1.md")]
const _ENUM_EXAMPLE: () = ();
}

#[doc(hidden)]
pub use pin_project_internal::pin_project;
Expand Down

0 comments on commit 485155f

Please sign in to comment.