From 9d8ac36813863fa70d72a974542fa1135b5c0015 Mon Sep 17 00:00:00 2001 From: Stjepan Glavina Date: Mon, 12 Aug 2019 19:50:30 +0200 Subject: [PATCH] Rename feature docs.rs to docs --- Cargo.toml | 6 +++--- README.md | 2 +- src/fs/dir_builder.rs | 6 +++--- src/fs/dir_entry.rs | 6 +++--- src/fs/file.rs | 10 +++++----- src/fs/open_options.rs | 6 +++--- src/io/buf_read.rs | 4 ++-- src/io/read.rs | 4 ++-- src/io/seek.rs | 4 ++-- src/io/stderr.rs | 10 +++++----- src/io/stdin.rs | 10 +++++----- src/io/stdout.rs | 10 +++++----- src/io/write.rs | 4 ++-- src/lib.rs | 2 +- src/net/tcp/listener.rs | 10 +++++----- src/net/tcp/stream.rs | 16 ++++++++-------- src/net/udp/mod.rs | 10 +++++----- src/os/mod.rs | 8 ++++---- src/os/unix/fs.rs | 2 +- src/os/unix/io.rs | 2 +- src/os/unix/net/datagram.rs | 4 ++-- src/os/unix/net/listener.rs | 2 +- src/os/unix/net/mod.rs | 2 +- src/os/unix/net/stream.rs | 2 +- src/os/windows/io.rs | 2 +- src/stream/stream.rs | 4 ++-- src/time/mod.rs | 2 +- 27 files changed, 75 insertions(+), 75 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 63e127a..8d0f53f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,11 @@ keywords = [] categories = ["asynchronous", "concurrency"] [package.metadata.docs.rs] -features = ["docs.rs"] -rustdoc-args = ["--features docs.rs"] +features = ["docs"] +rustdoc-args = ["--features docs"] [features] -"docs.rs" = [] +docs = [] [dependencies] async-task = { path = "async-task" } diff --git a/README.md b/README.md index b9be5a0..4dbf07d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ git clone git@github.com:stjepang/async-std.git && cd async-std Read the docs: ``` -cargo doc --features docs.rs --open +cargo doc --features docs --open ``` Check out the [examples](examples). To run an example: diff --git a/src/fs/dir_builder.rs b/src/fs/dir_builder.rs index 5647610..b8b6ff9 100644 --- a/src/fs/dir_builder.rs +++ b/src/fs/dir_builder.rs @@ -102,16 +102,16 @@ impl DirBuilder { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::fs::DirBuilderExt; } else if #[cfg(unix)] { use std::os::unix::fs::DirBuilderExt; } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl DirBuilderExt for DirBuilder { fn mode(&mut self, mode: u32) -> &mut Self { self.mode = Some(mode); diff --git a/src/fs/dir_entry.rs b/src/fs/dir_entry.rs index a16adae..105f22e 100644 --- a/src/fs/dir_entry.rs +++ b/src/fs/dir_entry.rs @@ -228,16 +228,16 @@ fn io_error(err: impl Into>) -> io::Err } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::fs::DirEntryExt; } else if #[cfg(unix)] { use std::os::unix::fs::DirEntryExt; } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl DirEntryExt for DirEntry { fn ino(&self) -> u64 { self.ino diff --git a/src/fs/file.rs b/src/fs/file.rs index 0a0a8e5..d84f098 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -772,7 +772,7 @@ impl From for File { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -782,9 +782,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for File { fn as_raw_fd(&self) -> RawFd { self.raw_fd @@ -805,9 +805,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] +#[cfg_attr(feature = "docs", doc(cfg(windows)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { impl AsRawHandle for File { fn as_raw_handle(&self) -> RawHandle { self.raw_handle.0 diff --git a/src/fs/open_options.rs b/src/fs/open_options.rs index b2ed401..1ac3dbe 100644 --- a/src/fs/open_options.rs +++ b/src/fs/open_options.rs @@ -333,16 +333,16 @@ impl OpenOptions { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::fs::OpenOptionsExt; } else if #[cfg(unix)] { use std::os::unix::fs::OpenOptionsExt; } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl OpenOptionsExt for OpenOptions { fn mode(&mut self, mode: u32) -> &mut Self { self.0.mode(mode); diff --git a/src/io/buf_read.rs b/src/io/buf_read.rs index b29bca3..6253037 100644 --- a/src/io/buf_read.rs +++ b/src/io/buf_read.rs @@ -10,7 +10,7 @@ use crate::future::Future; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); @@ -33,7 +33,7 @@ cfg_if! { /// /// [`std::io::BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html /// [`futures::io::AsyncBufRead`]: -/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html +/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html pub trait BufRead { /// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached. /// diff --git a/src/io/read.rs b/src/io/read.rs index 9c07dfc..ff3dc33 100644 --- a/src/io/read.rs +++ b/src/io/read.rs @@ -11,7 +11,7 @@ use crate::io; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); @@ -34,7 +34,7 @@ cfg_if! { /// /// [`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html /// [`futures::io::AsyncRead`]: -/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html +/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html pub trait Read { /// Reads some bytes from the byte stream. /// diff --git a/src/io/seek.rs b/src/io/seek.rs index 93a0b1c..110642c 100644 --- a/src/io/seek.rs +++ b/src/io/seek.rs @@ -9,7 +9,7 @@ use crate::io; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); @@ -32,7 +32,7 @@ cfg_if! { /// /// [`std::io::Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html /// [`futures::io::AsyncSeek`]: -/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html +/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html pub trait Seek { /// Seeks to a new position in a byte stream. /// diff --git a/src/io/stderr.rs b/src/io/stderr.rs index 14ff2b7..354a958 100644 --- a/src/io/stderr.rs +++ b/src/io/stderr.rs @@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stderr { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::windows::io::{AsRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -173,9 +173,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for Stderr { fn as_raw_fd(&self) -> RawFd { io::stderr().as_raw_fd() @@ -184,9 +184,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { impl AsRawHandle for Stderr { fn as_raw_handle(&self) -> RawHandle { io::stderr().as_raw_handle() diff --git a/src/io/stdin.rs b/src/io/stdin.rs index 84e8dd9..4449e21 100644 --- a/src/io/stdin.rs +++ b/src/io/stdin.rs @@ -195,7 +195,7 @@ impl futures::io::AsyncRead for Stdin { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::windows::io::{AsRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -205,9 +205,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for Stdin { fn as_raw_fd(&self) -> RawFd { io::stdin().as_raw_fd() @@ -216,9 +216,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { impl AsRawHandle for Stdin { fn as_raw_handle(&self) -> RawHandle { io::stdin().as_raw_handle() diff --git a/src/io/stdout.rs b/src/io/stdout.rs index 5626354..0911646 100644 --- a/src/io/stdout.rs +++ b/src/io/stdout.rs @@ -163,7 +163,7 @@ impl futures::io::AsyncWrite for Stdout { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, RawFd}; use crate::os::windows::io::{AsRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -173,9 +173,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for Stdout { fn as_raw_fd(&self) -> RawFd { io::stdout().as_raw_fd() @@ -184,9 +184,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { impl AsRawHandle for Stdout { fn as_raw_handle(&self) -> RawHandle { io::stdout().as_raw_handle() diff --git a/src/io/write.rs b/src/io/write.rs index 01cbd3a..9e90588 100644 --- a/src/io/write.rs +++ b/src/io/write.rs @@ -10,7 +10,7 @@ use crate::io; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); @@ -33,7 +33,7 @@ cfg_if! { /// /// [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html /// [`futures::io::AsyncWrite`]: -/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html +/// https://docs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html pub trait Write { /// Writes some bytes into the byte stream. /// diff --git a/src/lib.rs b/src/lib.rs index affbd1f..387bdf2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,7 @@ //! ``` #![feature(async_await)] -#![cfg_attr(feature = "docs.rs", feature(doc_cfg))] +#![cfg_attr(feature = "docs", feature(doc_cfg))] #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![doc(html_logo_url = "https://async.rs/images/logo--hero.svg")] diff --git a/src/net/tcp/listener.rs b/src/net/tcp/listener.rs index 90f3f63..32a67a8 100644 --- a/src/net/tcp/listener.rs +++ b/src/net/tcp/listener.rs @@ -260,7 +260,7 @@ impl From for TcpListener { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -270,9 +270,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for TcpListener { fn as_raw_fd(&self) -> RawFd { self.raw_fd @@ -293,9 +293,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] +#[cfg_attr(feature = "docs", doc(cfg(windows)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { // impl AsRawSocket for TcpListener { // fn as_raw_socket(&self) -> RawSocket { // self.raw_socket diff --git a/src/net/tcp/stream.rs b/src/net/tcp/stream.rs index a063cae..2a36ae5 100644 --- a/src/net/tcp/stream.rs +++ b/src/net/tcp/stream.rs @@ -24,9 +24,9 @@ use crate::task::{Context, Poll}; /// [`connect`]: struct.TcpStream.html#method.connect /// [accepting]: struct.TcpListener.html#method.accept /// [listener]: struct.TcpListener.html -/// [`AsyncRead`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html -/// [`AsyncWrite`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html -/// [`futures::io`]: https://docs.rs/futures-preview/0.3.0-alpha.13/futures/io +/// [`AsyncRead`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html +/// [`AsyncWrite`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io/trait.AsyncRead.html +/// [`futures::io`]: https://docs/futures-preview/0.3.0-alpha.13/futures/io /// [`shutdown`]: struct.TcpStream.html#method.shutdown /// [`std::net::TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html /// @@ -463,7 +463,7 @@ impl From for TcpStream { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -473,9 +473,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for TcpStream { fn as_raw_fd(&self) -> RawFd { self.raw_fd @@ -496,9 +496,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] +#[cfg_attr(feature = "docs", doc(cfg(windows)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { // impl AsRawSocket for TcpStream { // fn as_raw_socket(&self) -> RawSocket { // self.raw_socket diff --git a/src/net/udp/mod.rs b/src/net/udp/mod.rs index 964eb14..50774d6 100644 --- a/src/net/udp/mod.rs +++ b/src/net/udp/mod.rs @@ -537,7 +537,7 @@ impl From for UdpSocket { } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use crate::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; // use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle}; } else if #[cfg(unix)] { @@ -547,9 +547,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] cfg_if! { - if #[cfg(any(unix, feature = "docs.rs"))] { + if #[cfg(any(unix, feature = "docs"))] { impl AsRawFd for UdpSocket { fn as_raw_fd(&self) -> RawFd { self.raw_fd @@ -570,9 +570,9 @@ cfg_if! { } } -#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] +#[cfg_attr(feature = "docs", doc(cfg(windows)))] cfg_if! { - if #[cfg(any(windows, feature = "docs.rs"))] { + if #[cfg(any(windows, feature = "docs"))] { // use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}; // // impl AsRawSocket for UdpSocket { diff --git a/src/os/mod.rs b/src/os/mod.rs index e81f86b..fb9b941 100644 --- a/src/os/mod.rs +++ b/src/os/mod.rs @@ -1,9 +1,9 @@ //! OS-specific extensions. -#[cfg(any(unix, feature = "docs.rs"))] -#[cfg_attr(feature = "docs.rs", doc(cfg(unix)))] +#[cfg(any(unix, feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(unix)))] pub mod unix; -#[cfg(any(windows, feature = "docs.rs"))] -#[cfg_attr(feature = "docs.rs", doc(cfg(windows)))] +#[cfg(any(windows, feature = "docs"))] +#[cfg_attr(feature = "docs", doc(cfg(windows)))] pub mod windows; diff --git a/src/os/unix/fs.rs b/src/os/unix/fs.rs index 025760a..cb6b346 100644 --- a/src/os/unix/fs.rs +++ b/src/os/unix/fs.rs @@ -34,7 +34,7 @@ pub async fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Resu } cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { /// Unix-specific extensions to `DirBuilder`. pub trait DirBuilderExt { /// Sets the mode to create new directories with. This option defaults to diff --git a/src/os/unix/io.rs b/src/os/unix/io.rs index fb0d255..87e83ea 100644 --- a/src/os/unix/io.rs +++ b/src/os/unix/io.rs @@ -3,7 +3,7 @@ use cfg_if::cfg_if; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { /// Raw file descriptors. pub type RawFd = std::os::raw::c_int; diff --git a/src/os/unix/net/datagram.rs b/src/os/unix/net/datagram.rs index 468f875..8886689 100644 --- a/src/os/unix/net/datagram.rs +++ b/src/os/unix/net/datagram.rs @@ -43,14 +43,14 @@ use crate::task::{blocking, Poll}; /// # Ok(()) }) } /// ``` pub struct UnixDatagram { - #[cfg(not(feature = "docs.rs"))] + #[cfg(not(feature = "docs"))] io_handle: IoHandle, raw_fd: RawFd, } impl UnixDatagram { - #[cfg(not(feature = "docs.rs"))] + #[cfg(not(feature = "docs"))] fn new(socket: mio_uds::UnixDatagram) -> UnixDatagram { UnixDatagram { raw_fd: socket.as_raw_fd(), diff --git a/src/os/unix/net/listener.rs b/src/os/unix/net/listener.rs index f39de1a..ca55e90 100644 --- a/src/os/unix/net/listener.rs +++ b/src/os/unix/net/listener.rs @@ -50,7 +50,7 @@ use crate::task::{blocking, Context, Poll}; /// # Ok(()) }) } /// ``` pub struct UnixListener { - #[cfg(not(feature = "docs.rs"))] + #[cfg(not(feature = "docs"))] io_handle: IoHandle, raw_fd: RawFd, diff --git a/src/os/unix/net/mod.rs b/src/os/unix/net/mod.rs index f80dfd7..45062c4 100644 --- a/src/os/unix/net/mod.rs +++ b/src/os/unix/net/mod.rs @@ -11,7 +11,7 @@ mod listener; mod stream; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { use std::fmt; use std::path::Path; diff --git a/src/os/unix/net/stream.rs b/src/os/unix/net/stream.rs index d92e2a3..607c234 100644 --- a/src/os/unix/net/stream.rs +++ b/src/os/unix/net/stream.rs @@ -40,7 +40,7 @@ use crate::task::{blocking, Context, Poll}; /// # Ok(()) }) } /// ``` pub struct UnixStream { - #[cfg(not(feature = "docs.rs"))] + #[cfg(not(feature = "docs"))] pub(super) io_handle: IoHandle, pub(super) raw_fd: RawFd, diff --git a/src/os/windows/io.rs b/src/os/windows/io.rs index 3776147..adf0c0d 100644 --- a/src/os/windows/io.rs +++ b/src/os/windows/io.rs @@ -3,7 +3,7 @@ use cfg_if::cfg_if; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { /// Raw HANDLEs. pub type RawHandle = *mut std::os::raw::c_void; diff --git a/src/stream/stream.rs b/src/stream/stream.rs index dee195d..62e9f4e 100644 --- a/src/stream/stream.rs +++ b/src/stream/stream.rs @@ -29,7 +29,7 @@ use crate::future::Future; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture<'a, T>(std::marker::PhantomData<&'a T>); @@ -52,7 +52,7 @@ cfg_if! { /// /// [`std::iter::Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html /// [`futures::stream::Stream`]: -/// https://docs.rs/futures-preview/0.3.0-alpha.17/futures/stream/trait.Stream.html +/// https://docs/futures-preview/0.3.0-alpha.17/futures/stream/trait.Stream.html pub trait Stream { /// The type of items yielded by this stream. type Item; diff --git a/src/time/mod.rs b/src/time/mod.rs index 83dee9c..b19e7ea 100644 --- a/src/time/mod.rs +++ b/src/time/mod.rs @@ -40,7 +40,7 @@ use crate::io; use crate::task::{Context, Poll}; cfg_if! { - if #[cfg(feature = "docs.rs")] { + if #[cfg(feature = "docs")] { #[doc(hidden)] pub struct ImplFuture(std::marker::PhantomData);