From 26f82899db084c3f936bb7efc2b6db32ab4275e4 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 19 Feb 2024 12:09:48 +0100 Subject: [PATCH] Don't ignore doc test. --- Cargo.toml | 6 ++++++ src/mpmc.rs | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a1d1d8b1f..c3f1046e14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,12 @@ stable_deref_trait = { version = "1", default-features = false } ufmt = "0.2" static_assertions = "1.1.0" +[target.'cfg(all(target_arch = "arm", target_os = "none"))'.dev-dependencies] +cortex-m = "0.7" +cortex-m-rt = "0.7" +cortex-m-semihosting = "0.5" +panic-semihosting = "0.6" + [package.metadata.docs.rs] features = ["ufmt", "serde", "defmt-03", "mpmc_large", "portable-atomic-critical-section"] # for the pool module diff --git a/src/mpmc.rs b/src/mpmc.rs index 9b0b6feb18..a07bdc48cf 100644 --- a/src/mpmc.rs +++ b/src/mpmc.rs @@ -7,8 +7,8 @@ //! //! This queue can be constructed in "const context". Placing it in a `static` variable lets *all* //! contexts (interrupts/threads/`main`) safely enqueue and dequeue items from it. -//! -//! ``` ignore +#![cfg_attr(all(target_arch = "arm", target_os = "none"), doc = "```no_run\n")] +#![cfg_attr(not(all(target_arch = "arm", target_os = "none")), doc = "```ignore\n")] //! #![no_main] //! #![no_std] //! @@ -50,7 +50,7 @@ //! *COUNT += 1; //! } //! ``` -//! +//! //! # Benchmark //! //! Measured on a ARM Cortex-M3 core running at 8 MHz and with zero Flash wait cycles