diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bf8d2b..a2d1b1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - - run: cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]' + - run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --all-features clippy: name: Clippy diff --git a/automation/Jenkinsfile b/automation/Jenkinsfile index 4da4a47..b2e6c5d 100644 --- a/automation/Jenkinsfile +++ b/automation/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { stage('Docs') { steps { sh """ - cargo +nightly doc --all-features --config 'build.rustdocflags=["--cfg", "docs_rs"]' + RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc --all-features """ } } diff --git a/va416xx-hal/Cargo.toml b/va416xx-hal/Cargo.toml index 94ff791..aa91a5e 100644 --- a/va416xx-hal/Cargo.toml +++ b/va416xx-hal/Cargo.toml @@ -37,3 +37,7 @@ default = ["rt", "revb"] rt = ["va416xx/rt"] defmt = ["dep:defmt", "fugit/defmt"] revb = [] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--generate-link-to-definition"] diff --git a/va416xx-hal/src/lib.rs b/va416xx-hal/src/lib.rs index 0c5ea66..ec5521d 100644 --- a/va416xx-hal/src/lib.rs +++ b/va416xx-hal/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #[cfg(test)] extern crate std; diff --git a/va416xx/Cargo.toml b/va416xx/Cargo.toml index fff48de..c33a564 100644 --- a/va416xx/Cargo.toml +++ b/va416xx/Cargo.toml @@ -26,4 +26,4 @@ rt = ["cortex-m-rt/device"] [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docs_rs", "--generate-link-to-definition"] +rustdoc-args = ["--generate-link-to-definition"] diff --git a/va416xx/src/lib.rs b/va416xx/src/lib.rs index 9fbc88f..aed7d6d 100644 --- a/va416xx/src/lib.rs +++ b/va416xx/src/lib.rs @@ -4,7 +4,7 @@ svd2rust release can be generated by cloning the svd2rust [repository], checking #![allow(non_snake_case)] #![no_std] // Manually inserted. -#![cfg_attr(docs_rs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] use core::marker::PhantomData; use core::ops::Deref; #[doc = r"Number available in the NVIC for configuring priority"] diff --git a/vorago-peb1/Cargo.toml b/vorago-peb1/Cargo.toml index bae4c16..a777ee1 100644 --- a/vorago-peb1/Cargo.toml +++ b/vorago-peb1/Cargo.toml @@ -28,3 +28,7 @@ features = ["out_f32"] [features] rt = ["va416xx-hal/rt"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--generate-link-to-definition"] diff --git a/vorago-peb1/src/lib.rs b/vorago-peb1/src/lib.rs index 5cb944e..fe12701 100644 --- a/vorago-peb1/src/lib.rs +++ b/vorago-peb1/src/lib.rs @@ -1,5 +1,6 @@ //! Board support crate for the VORAGO PEB1 board. #![no_std] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] pub use lis2dh12;