File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,10 @@ fn main() -> Result<(), Box<dyn Error>> {
9
9
let output = std:: env:: var ( "OUT_DIR" ) ?;
10
10
:: std:: fs:: write ( format ! ( "{}/target" , output) , target. as_bytes ( ) ) ?;
11
11
12
+ println ! ( "cargo:rerun-if-env-changed=DOCS_RS" ) ;
13
+ if std:: env:: var_os ( "DOCS_RS" ) . as_deref ( ) == Some ( std:: ffi:: OsStr :: new ( "1" ) ) {
14
+ println ! ( "cargo:rustc-cfg=docs_rs" ) ;
15
+ }
16
+
12
17
Ok ( ( ) )
13
18
}
Original file line number Diff line number Diff line change 1
1
#![ warn( missing_docs) ]
2
2
#![ allow( clippy:: new_without_default) ]
3
3
4
+ #![ cfg_attr( docs_rs, feature( doc_cfg) ) ]
5
+
4
6
//! Rustwide is a library to execute your code on the Rust ecosystem, powering projects like
5
7
//! [Crater][crater] and [docs.rs][docsrs].
6
8
//!
7
- //! Rustwide uses feature flags to enable or disable parts of its code at compile time. The
8
- //! available flags are:
9
+ //! ## Feature flags
10
+ //!
11
+ //! Rustwide provides some optional features that can be enabled with Cargo:
9
12
//!
10
13
//! * **unstable**: allow Rustwide to use unstable Rust and Cargo features. While this feature also
11
14
//! works on Rust stable it might cause Rustwide to break, and **no stability guarantee is
Original file line number Diff line number Diff line change @@ -101,10 +101,8 @@ impl WorkspaceBuilder {
101
101
/// to build a lot of crates in a batch, but having the option disabled might cause trouble if
102
102
/// you need to build recently published crates, as they might be missing from the cached
103
103
/// index.
104
- ///
105
- /// **To call this method the `unstable` rustwide feature flag needs to be enabled**, as it
106
- /// relies on unstable Cargo features.
107
- #[ cfg( feature = "unstable" ) ]
104
+ #[ cfg( any( feature = "unstable" , doc) ) ]
105
+ #[ cfg_attr( docs_rs, doc( cfg( feature = "unstable" ) ) ) ]
108
106
pub fn fetch_registry_index_during_builds ( mut self , enable : bool ) -> Self {
109
107
self . fetch_registry_index_during_builds = enable;
110
108
self
You can’t perform that action at this time.
0 commit comments