diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c4c02f44d3..60f4ca1f96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,9 +126,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@nightly - name: Build docs - run: cargo doc + run: cargo doc --features "default all-dialects emit-description emit-extensions format-generated-code tokio-1 signing" - name: Deploy uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/master' }} diff --git a/mavlink-core/src/lib.rs b/mavlink-core/src/lib.rs index 12d470b614..2ef674b104 100644 --- a/mavlink-core/src/lib.rs +++ b/mavlink-core/src/lib.rs @@ -19,6 +19,7 @@ //! feature without also using the `uavionix` and `icarous` features. //! #![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(all(any(docsrs, doc), not(doctest)), feature(doc_auto_cfg))] #![deny(clippy::all)] #![warn(clippy::use_self)] diff --git a/mavlink/src/lib.rs b/mavlink/src/lib.rs index 3690dd954c..bfdcbeafb2 100644 --- a/mavlink/src/lib.rs +++ b/mavlink/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(not(feature = "std"), no_std)] +#![cfg_attr(all(any(docsrs, doc), not(doctest)), feature(doc_auto_cfg))] // include generate definitions include!(concat!(env!("OUT_DIR"), "/mod.rs"));