From 3f5d3f74f35965564f2f38a9098bf3d53c3cb7c3 Mon Sep 17 00:00:00 2001 From: Wojciech Graj Date: Tue, 21 Oct 2025 11:50:33 +0200 Subject: [PATCH] Automatically generate feature gate docs rust-lang/rust#43781 --- src/lib.rs | 1 - src/read.rs | 3 --- src/write.rs | 1 - 3 files changed, 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1b830d6..ca4180c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -170,7 +170,6 @@ pub use read::{ BitRead, BitRead2, BitReader, ByteRead, ByteReader, FromBitStream, FromBitStreamUsing, FromBitStreamWith, FromByteStream, FromByteStreamUsing, FromByteStreamWith, }; -#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] #[cfg(feature = "alloc")] pub use write::BitRecorder; pub use write::{ diff --git a/src/read.rs b/src/read.rs index c91cc38..165c534 100644 --- a/src/read.rs +++ b/src/read.rs @@ -713,7 +713,6 @@ pub trait BitRead { /// assert_eq!(r.read::<8, u8>().unwrap(), 0x04); /// ``` #[cfg(feature = "alloc")] - #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] fn read_to_vec(&mut self, bytes: usize) -> io::Result> { read_to_vec(|buf| self.read_bytes(buf), bytes) } @@ -1354,7 +1353,6 @@ pub trait BitRead2 { /// /// Passes along any I/O error from the underlying stream. #[cfg(feature = "alloc")] - #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] fn read_to_vec(&mut self, bytes: usize) -> io::Result> { read_to_vec(|buf| self.read_bytes(buf), bytes) } @@ -1967,7 +1965,6 @@ pub trait ByteRead { /// /// Passes along any I/O error from the underlying stream. #[cfg(feature = "alloc")] - #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] fn read_to_vec(&mut self, bytes: usize) -> io::Result> { read_to_vec(|buf| self.read_bytes(buf), bytes) } diff --git a/src/write.rs b/src/write.rs index d0689ea..8148c7d 100644 --- a/src/write.rs +++ b/src/write.rs @@ -2236,7 +2236,6 @@ mod bit_recorder { /// recorder.playback(&mut writer); /// assert_eq!(writer.into_writer(), [0b10110111]); /// ``` - #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] pub struct BitRecorder { writer: BitWriter, E>, phantom: PhantomData,