Skip to content

Commit 356f968

Browse files
committed
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 rust-lang/rust#61351 Fixes #101
1 parent 28ac4e0 commit 356f968

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
### Changed
1313
### Fixed
14+
15+
- Fixed the docs for `mockall_examples`
16+
([#103](https://github.com/asomers/mockall/pull/103))
17+
1418
### Removed
1519

1620
## [0.6.0] - 5 December 2019

mockall_examples/Cargo.toml

-7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,5 @@ description = """
1212
Examples of autogenerated mock objects by Mockall
1313
"""
1414

15-
[package.metadata.docs.rs]
16-
features = ["nightly-docs"]
17-
18-
[features]
19-
# For building documentation only; no functional change to the library.
20-
nightly-docs = []
21-
2215
[dependencies]
2316
mockall = { version = "= 0.6.0", path = "../mockall" }

mockall_examples/src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// vim: tw=80
2-
#![cfg_attr(feature = "nightly-docs", feature(doc_cfg))]
32

43
//! Examples of mock objects and their generated methods.
54
//!
@@ -8,13 +7,13 @@
87
//! crate. You should never depend on this crate.
98
//
109

11-
#[cfg(all(feature = "nightly-docs", rustdoc))]
10+
#[cfg(doc)]
1211
use mockall::*;
1312

1413
/// A basic trait with several kinds of method.
1514
///
1615
/// It is mocked by the [`MockFoo`](struct.MockFoo.html) struct.
17-
#[cfg(all(feature = "nightly-docs", rustdoc))]
16+
#[cfg(doc)]
1817
#[automock]
1918
pub trait Foo {
2019
/// A method with a `'static` return type
@@ -33,7 +32,7 @@ pub trait Foo {
3332
fn bang(x: i32) -> i32;
3433
}
3534

36-
#[cfg(all(feature = "nightly-docs", rustdoc))]
35+
#[cfg(doc)]
3736
#[automock(mod mock_ffi;)]
3837
extern "C" {
3938
/// A foreign "C" function

0 commit comments

Comments
 (0)