diff --git a/tokio-postgres/src/error/mod.rs b/tokio-postgres/src/error/mod.rs index d83c50dd..3e5f992b 100644 --- a/tokio-postgres/src/error/mod.rs +++ b/tokio-postgres/src/error/mod.rs @@ -348,6 +348,7 @@ enum Kind { UnsupportedAuthentication, Authentication, ConnectionSyntax, + #[cfg(feature = "runtime")] Connect, #[cfg(feature = "runtime")] MissingHost, @@ -390,6 +391,7 @@ impl fmt::Display for Error { Kind::UnsupportedAuthentication => "unsupported authentication method requested", Kind::Authentication => "authentication error", Kind::ConnectionSyntax => "invalid connection string", + #[cfg(feature = "runtime")] Kind::Connect => "error connecting to server", #[cfg(feature = "runtime")] Kind::MissingHost => "host not provided",