Merge rust-bitcoin/rust-bitcoin#1504: Change `#[cfg(docsrs)]` to `#[cfg(doc)]` on `use`

8d58ee2ca3 Change `#[cfg(docsrs)]` to `#[cfg(doc)]` on `use` (Martin Habovstiak)

Pull request description:

  The additional `use` items were added to improve the style of documentation. Because they were only used for doc they were `cfg`ed. But because this is independent from being built by `docs.rs` the `cfg` should've been `doc` not `docsrs`.

  IOW `docsrs` means roughly `all(doc, nightly)` and the added items are unrelated to `nightly`.

  Do we want CI for this kind of thing? It feels a bit too much to me but if someone sends a PR I probably won't reject it.

ACKs for top commit:
  apoelstra:
    ACK 8d58ee2ca3

Tree-SHA512: 89ee4d1a0a43595576850983a82aed9644e898d1ad9efdc982ca697ae2ad9ec894fe59f4c6d2a46aad86c7160d260da964c0bd3dba20b455d4bdbb3d0b09e695
This commit is contained in:
Andrew Poelstra 2022-12-31 20:36:49 +00:00
commit ea43930339
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ use crate::prelude::*;
use crate::parse::{self, impl_parse_str_through_int};
use crate::string::FromHexStr;
#[cfg(docsrs)]
#[cfg(doc)]
use crate::absolute;
/// The Threshold for deciding whether a lock time value is a height or a time (see [Bitcoin Core]).

View File

@ -13,7 +13,7 @@ use core::convert::TryFrom;
#[cfg(all(test, mutate))]
use mutagen::mutate;
#[cfg(docsrs)]
#[cfg(doc)]
use crate::relative;
/// A relative lock time value, representing either a block height or time (512 second intervals).