diff --git a/src/lib.rs b/src/lib.rs index ac8a3aed2..857b6cf55 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,8 +65,11 @@ pub use uuid::Uuid; use std::marker::PhantomData; -pub type Param = PhantomData; +// These types allow the `sqlx_macros::sql!()` macro to polymorphically compare a +// given parameter's type to an expected parameter type even if the former +// is behind a reference or in `Option` +#[doc(hidden)] pub struct TyCons(PhantomData); impl TyCons { @@ -75,6 +78,7 @@ impl TyCons { } } +#[doc(hidden)] pub trait TyConsExt: Sized { type Cons; fn ty_cons(self) -> Self::Cons {