diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 626eb2f9c..3c74b0428 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,10 +28,16 @@ jobs: profile: minimal toolchain: stable override: true - - uses: actions-rs/cargo@v1 + - name: Test all targets + uses: actions-rs/cargo@v1 with: command: test args: --workspace --all-targets + - name: Test docs + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --doc fmt: name: Rustfmt diff --git a/ash/src/entry.rs b/ash/src/entry.rs index 3a4d689df..558df95d1 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -191,10 +191,10 @@ impl EntryCustom { } #[doc = ""] - /// ```rust,no_run + /// ```no_run /// # use ash::{Entry, vk}; - /// # fn main() -> Result<(), Box> { - /// let entry = Entry::new()?; + /// # fn main() -> Result<(), Box> { + /// let entry = unsafe { Entry::new() }?; /// match entry.try_enumerate_instance_version()? { /// // Vulkan 1.1+ /// Some(version) => { diff --git a/ash/src/entry_libloading.rs b/ash/src/entry_libloading.rs index 4ff55f3f0..ab286ebe7 100644 --- a/ash/src/entry_libloading.rs +++ b/ash/src/entry_libloading.rs @@ -46,10 +46,10 @@ impl EntryCustom> { /// `dlopen`ing native libraries is inherently unsafe. The safety guidelines /// for [`Library::new`] and [`Library::get`] apply here. /// - /// ```rust,no_run + /// ```no_run /// use ash::{vk, Entry, version::EntryV1_0}; - /// # fn main() -> Result<(), Box> { - /// let entry = Entry::new()?; + /// # fn main() -> Result<(), Box> { + /// let entry = unsafe { Entry::new() }?; /// let app_info = vk::ApplicationInfo { /// api_version: vk::make_version(1, 0, 0), /// ..Default::default() diff --git a/ash/src/lib.rs b/ash/src/lib.rs index 11374f5df..4f3f59634 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -5,10 +5,10 @@ //! //! ## Examples //! -//! ```rust,no_run +//! ```no_run //! use ash::{vk, Entry, version::EntryV1_0}; //! # fn main() -> Result<(), Box> { -//! let entry = Entry::new()?; +//! let entry = unsafe { Entry::new() }?; //! let app_info = vk::ApplicationInfo { //! api_version: vk::make_version(1, 0, 0), //! ..Default::default()