From 1e1e925c043752b4a6dcf7e2b1ae073782a72beb Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 20 Feb 2020 21:24:41 -0700 Subject: [PATCH] Fix building cargo-examples after stabilization of #cfg(doc) `rustdoc` is now just `doc` and no longer requires unstable features. This raises the MSRV for building cargo-examples's documentationto 1.41.0. See https://github.com/rust-lang/rust/pull/61351 Fixes #101 --- CHANGELOG.md | 4 ++++ mockall_examples/Cargo.toml | 7 ------- mockall_examples/src/lib.rs | 7 +++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10a2bb84..dbf08a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed ### Fixed + +- Fixed the docs for `mockall_examples` + ([#103](https://github.com/asomers/mockall/pull/103)) + ### Removed ## [0.6.0] - 5 December 2019 diff --git a/mockall_examples/Cargo.toml b/mockall_examples/Cargo.toml index ac174aea..4ddc3c41 100644 --- a/mockall_examples/Cargo.toml +++ b/mockall_examples/Cargo.toml @@ -12,12 +12,5 @@ description = """ Examples of autogenerated mock objects by Mockall """ -[package.metadata.docs.rs] -features = ["nightly-docs"] - -[features] -# For building documentation only; no functional change to the library. -nightly-docs = [] - [dependencies] mockall = { version = "= 0.6.0", path = "../mockall" } diff --git a/mockall_examples/src/lib.rs b/mockall_examples/src/lib.rs index 180779ac..538ac2f7 100644 --- a/mockall_examples/src/lib.rs +++ b/mockall_examples/src/lib.rs @@ -1,5 +1,4 @@ // vim: tw=80 -#![cfg_attr(feature = "nightly-docs", feature(doc_cfg))] //! Examples of mock objects and their generated methods. //! @@ -8,13 +7,13 @@ //! crate. You should never depend on this crate. // -#[cfg(all(feature = "nightly-docs", rustdoc))] +#[cfg(doc)] use mockall::*; /// A basic trait with several kinds of method. /// /// It is mocked by the [`MockFoo`](struct.MockFoo.html) struct. -#[cfg(all(feature = "nightly-docs", rustdoc))] +#[cfg(doc)] #[automock] pub trait Foo { /// A method with a `'static` return type @@ -33,7 +32,7 @@ pub trait Foo { fn bang(x: i32) -> i32; } -#[cfg(all(feature = "nightly-docs", rustdoc))] +#[cfg(doc)] #[automock(mod mock_ffi;)] extern "C" { /// A foreign "C" function