From 515660fa9113bf14500bbc2777c1ed0efb1e4c28 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sat, 4 Nov 2023 23:06:39 -0400 Subject: [PATCH] Prevent warnings running `cargo build` When none of the features is enabled (default features), prevent compiler warnings. --- sqlx-macros-core/src/database/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sqlx-macros-core/src/database/mod.rs b/sqlx-macros-core/src/database/mod.rs index 09ac2c5f75..c4fe696700 100644 --- a/sqlx-macros-core/src/database/mod.rs +++ b/sqlx-macros-core/src/database/mod.rs @@ -74,6 +74,7 @@ impl CachingDescribeBlocking { } } +#[cfg(any(feature = "postgres", feature = "mysql", feature = "sqlite"))] macro_rules! impl_database_ext { ( $database:path { @@ -126,6 +127,7 @@ macro_rules! impl_database_ext { } } +#[cfg(any(feature = "postgres", feature = "mysql", feature = "sqlite"))] macro_rules! impl_describe_blocking { ($database:path $(,)?) => { fn describe_blocking( @@ -150,6 +152,7 @@ macro_rules! impl_describe_blocking { }; } +#[cfg(any(feature = "postgres", feature = "mysql", feature = "sqlite"))] macro_rules! input_ty { ($ty:ty, $input:ty) => { stringify!($input)