Merge rust-bitcoin/rust-bitcoin#1871: Fix conditional configuration options usage

0046bb8ad8 Fix usage of cfg(rust_1_53) (Tobin C. Harding)
c3450f3913 Remove stale usage of doc(cfg) (Tobin C. Harding)

Pull request description:

  These build cfg options are not features, fix broken usage. And remove stale docsrs attribute while we are at it. Bad rust-bitcoin devs.

  Found while reviewing #1870

ACKs for top commit:
  apoelstra:
    ACK 0046bb8ad8
  Kixunil:
    ACK 0046bb8ad8

Tree-SHA512: 7053affef6654ff203c93590bf081e165f019feb040aa8c55259ffe4e15eaf0e7522f6e5a4f6f62e8f578420b0313f4b7b17c46b741b7fcfd05750e5c5976589
This commit is contained in:
Andrew Poelstra 2023-05-28 21:47:26 +00:00
commit 7315eac5ee
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 2 additions and 3 deletions

View File

@ -14,7 +14,7 @@ use crate::prelude::*;
/// break invariants. Therefore auditing this module should be sufficient.
mod primitive {
use core::convert::{TryFrom, TryInto};
#[cfg(feature = "rust_v_1_53")]
#[cfg(rust_v_1_53)]
use core::ops::Bound;
use core::ops::{
Index, Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive,
@ -105,8 +105,7 @@ mod primitive {
RangeInclusive<usize>,
RangeToInclusive<usize>
);
#[cfg(feature = "rust_v_1_53")]
#[cfg_attr(docsrs, doc(cfg(feature = "rust_v_1_53")))]
#[cfg(rust_v_1_53)]
delegate_index!((Bound<usize>, Bound<usize>));
impl Index<usize> for PushBytes {