From bf0c6137d4c07d96508ede526ff8c7163cc40180 Mon Sep 17 00:00:00 2001 From: Zachary Dremann Date: Thu, 10 Jul 2025 22:54:51 -0400 Subject: [PATCH] test: ignore doctest for StaticChannel when static feature is not enabled This allows a `cargo test` without arguments to pass, before it would fail because the `static` feature is not enabled by default, there is a doc example which uses `mpsc::StaticChannel` --- src/mpsc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mpsc.rs b/src/mpsc.rs index a49d468..0180d8d 100644 --- a/src/mpsc.rs +++ b/src/mpsc.rs @@ -179,7 +179,8 @@ //! //! A statically allocated channel may be used without heap allocation: //! -//! ``` +#![cfg_attr(feature = "static", doc = "```")] +#![cfg_attr(not(feature = "static"), doc = "```ignore")] //! // We are in a `no_std` context with no memory allocator! //! #![no_std] //! use thingbuf::mpsc;