enumn: fix duplicate fn in doc tests

Two parts of the documentation mention the generated `fn n`, which (as
of Rust 1.35) causes a doc test failure.  Change these code blocks to be
ignored instead of executed to avoid the problem.

BUG=None
TEST=cargo test --doc -p enumn

Change-Id: I9d08d2a35d65930bd2fa899256c00e1da643ba4f
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1632035
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel Verkamp 2019-05-28 10:25:25 -07:00 committed by Commit Bot
parent 99c65d41f8
commit d7738ec486

View file

@ -51,7 +51,7 @@
//! attribute. If a `repr` is specified, the input to `n` will be required to be
//! of that type.
//!
//! ```rust
//! ```ignore
//! use enumn::N;
//!
//! #[derive(N)]
@ -73,7 +73,7 @@
//! On the other hand if no `repr` is specified then we get a signature that is
//! generic over a variety of possible types.
//!
//! ```rust
//! ```ignore
//! # enum E {}
//! #
//! impl E {