File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed
Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 2121 - uses : actions-rs/toolchain@v1
2222 with :
2323 profile : minimal
24- toolchain : nightly # Needed for -Z minimal-versions
24+ toolchain : nightly # Needed for -Z minimal-versions and doc_cfg
2525 override : true
2626 - uses : Swatinem/rust-cache@v1
2727 - name : Install precompiled cargo-deadlinks
3030 wget -O /tmp/cargo-deadlinks $URL
3131 chmod +x /tmp/cargo-deadlinks
3232 mv /tmp/cargo-deadlinks ~/.cargo/bin
33- - run : cargo deadlinks -- --features=custom,std
33+ - name : Generate Docs
34+ env :
35+ RUSTDOCFLAGS : --cfg docsrs
36+ run : cargo deadlinks -- --features=custom,std
3437 - run : |
3538 cargo generate-lockfile -Z minimal-versions
3639 cargo test --features=custom,std
Original file line number Diff line number Diff line change @@ -50,3 +50,4 @@ test-in-browser = []
5050
5151[package .metadata .docs .rs ]
5252features = [" std" , " custom" ]
53+ rustdoc-args = [" --cfg" , " docsrs" ]
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ use core::num::NonZeroU32;
1212
1313/// Register a function to be invoked by `getrandom` on unsupported targets.
1414///
15- /// *This API requires the `"custom"` Cargo feature to be activated*.
16- ///
1715/// ## Writing a custom `getrandom` implementation
1816///
1917/// The function to register must have the same signature as
@@ -75,6 +73,7 @@ use core::num::NonZeroU32;
7573/// [top-level documentation](index.html#custom-implementations) this
7674/// registration only has an effect on unsupported targets.
7775#[ macro_export]
76+ #[ cfg_attr( docsrs, doc( cfg( feature = "custom" ) ) ) ]
7877macro_rules! register_custom_getrandom {
7978 ( $path: path) => {
8079 // We use an extern "C" function to get the guarantees of a stable ABI.
Original file line number Diff line number Diff line change 55// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
66// option. This file may not be copied, modified, or distributed
77// except according to those terms.
8+ #![ cfg_attr( docsrs, doc( cfg( feature = "std" ) ) ) ]
89extern crate std;
910
1011use crate :: Error ;
Original file line number Diff line number Diff line change 146146) ]
147147#![ no_std]
148148#![ warn( rust_2018_idioms, unused_lifetimes, missing_docs) ]
149+ #![ cfg_attr( docsrs, feature( doc_cfg) ) ]
149150
150151#[ macro_use]
151152extern crate cfg_if;
You can’t perform that action at this time.
0 commit comments