From 4f9d10e7c840bbcb29991c978a5c07b001e7fcd5 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 22 Jun 2024 11:19:35 -0700 Subject: fix annotation doc test not compiling under nostd ... this makes the doc test not exist under nostd, yes. `VecSink` does not have a no-std alternative that makes the example reasonable. --- src/annotation/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/annotation/mod.rs b/src/annotation/mod.rs index 0248b94..0d1f1f8 100644 --- a/src/annotation/mod.rs +++ b/src/annotation/mod.rs @@ -19,6 +19,8 @@ //! in a generic setting, there isn't much to do with a `FieldDescription` other than display it. a //! typical use might look something like: //! ``` +//! #[cfg(feature="std")] +//! # { //! use core::fmt; //! //! use yaxpeax_arch::annotation::{AnnotatingDecoder, VecSink}; @@ -40,6 +42,7 @@ //! println!(" bits [{}, {}]: {}", start, end, desc); //! } //! } +//! # } //! ``` //! //! note that the range `[start, end]` for a reported span is _inclusive_. the `end`-th bit of a -- cgit v1.1