Skip to content

Commit

Permalink
Fix building cargo-examples after stabilization of #cfg(doc)
Browse files Browse the repository at this point in the history
`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 rust-lang/rust#61351

Fixes #101
  • Loading branch information
asomers committed Feb 21, 2020
1 parent 28ac4e0 commit 356f968
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions mockall_examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
7 changes: 3 additions & 4 deletions mockall_examples/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// vim: tw=80
#![cfg_attr(feature = "nightly-docs", feature(doc_cfg))]

//! Examples of mock objects and their generated methods.
//!
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 356f968

Please sign in to comment.