From 7d3772e23bfffcc9cf5c73a6cdac5dfb40f891e1 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Wed, 22 Jan 2020 20:49:22 -0800 Subject: [PATCH] Resolve PR comments --- sqlx-core/src/io/tls.rs | 3 --- sqlx-core/src/mysql/connection.rs | 1 - sqlx-core/src/postgres/connection.rs | 1 - sqlx-core/src/runtime.rs | 2 -- sqlx-macros/src/lib.rs | 1 - src/macros.rs | 4 ++++ 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sqlx-core/src/io/tls.rs b/sqlx-core/src/io/tls.rs index e43d98f9..0e5f136f 100644 --- a/sqlx-core/src/io/tls.rs +++ b/sqlx-core/src/io/tls.rs @@ -114,19 +114,16 @@ impl AsyncWrite for MaybeTlsStream { } #[cfg(feature = "runtime-async-std")] - #[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))] fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { forward_pin!(self.poll_close(cx)) } #[cfg(feature = "runtime-tokio")] - #[cfg_attr(docsrs, doc(cfg(feature = "runtime-tokio")))] fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { forward_pin!(self.poll_shutdown(cx)) } #[cfg(feature = "runtime-async-std")] - #[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))] fn poll_write_vectored( mut self: Pin<&mut Self>, cx: &mut Context, diff --git a/sqlx-core/src/mysql/connection.rs b/sqlx-core/src/mysql/connection.rs index 7a96ce89..efd40585 100644 --- a/sqlx-core/src/mysql/connection.rs +++ b/sqlx-core/src/mysql/connection.rs @@ -445,7 +445,6 @@ impl MySqlConnection { } #[cfg(feature = "tls")] - #[cfg_attr(docsrs, doc(cfg(feature = "tls")))] async fn try_ssl( &mut self, url: &Url, diff --git a/sqlx-core/src/postgres/connection.rs b/sqlx-core/src/postgres/connection.rs index ec27ba40..b6e5fc99 100644 --- a/sqlx-core/src/postgres/connection.rs +++ b/sqlx-core/src/postgres/connection.rs @@ -99,7 +99,6 @@ pub struct PgConnection { impl PgConnection { #[cfg(feature = "tls")] - #[cfg_attr(docsrs, doc(cfg(feature = "tls")))] async fn try_ssl( &mut self, url: &Url, diff --git a/sqlx-core/src/runtime.rs b/sqlx-core/src/runtime.rs index 4e3f9088..15918fbf 100644 --- a/sqlx-core/src/runtime.rs +++ b/sqlx-core/src/runtime.rs @@ -1,5 +1,4 @@ #[cfg(feature = "runtime-async-std")] -#[cfg_attr(docsrs, doc(cfg(feature = "runtime-async-std")))] pub use async_std::{ fs, future::timeout, @@ -12,7 +11,6 @@ pub use async_std::{ }; #[cfg(feature = "runtime-tokio")] -#[cfg_attr(docsrs, doc(cfg(feature = "runtime-tokio")))] pub use tokio::{ fs, io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}, diff --git a/sqlx-macros/src/lib.rs b/sqlx-macros/src/lib.rs index f3f7522d..7ae98436 100644 --- a/sqlx-macros/src/lib.rs +++ b/sqlx-macros/src/lib.rs @@ -2,7 +2,6 @@ not(any(feature = "postgres", feature = "mysql")), allow(dead_code, unused_macros, unused_imports) )] -#![cfg_attr(docsrs, feature(doc_cfg))] extern crate proc_macro; use proc_macro::TokenStream; diff --git a/src/macros.rs b/src/macros.rs index 54cb6d78..35f911fd 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -83,6 +83,7 @@ /// * [query_file!] if you want to define the SQL query out-of-line, /// * [query_file_as!] if you want both of the above. #[macro_export] +#[cfg_attr(docsrs, doc(cfg(feature = "macros")))] macro_rules! query ( // by emitting a macro definition from our proc-macro containing the result tokens, // we no longer have a need for `proc-macro-hack` @@ -145,6 +146,7 @@ macro_rules! query ( /// # fn main() {} /// ``` #[macro_export] +#[cfg_attr(docsrs, doc(cfg(feature = "macros")))] macro_rules! query_file ( ($query:literal) => (#[allow(dead_code)]{ #[macro_use] @@ -210,6 +212,7 @@ macro_rules! query_file ( /// # fn main() {} /// ``` #[macro_export] +#[cfg_attr(docsrs, doc(cfg(feature = "macros")))] macro_rules! query_as ( ($out_struct:path, $query:literal) => (#[allow(dead_code)] { #[macro_use] @@ -260,6 +263,7 @@ macro_rules! query_as ( /// # fn main() {} /// ``` #[macro_export] +#[cfg_attr(docsrs, doc(cfg(feature = "macros")))] macro_rules! query_file_as ( ($out_struct:path, $query:literal) => (#[allow(dead_code)] { #[macro_use]