diff --git a/strategy/src/lib.rs b/strategy/src/lib.rs index 04e73ca..8cebdf7 100644 --- a/strategy/src/lib.rs +++ b/strategy/src/lib.rs @@ -208,11 +208,13 @@ macro_rules! easy_wrapper { $(#[$wait_meta])* #[inline] + #[allow(dead_code)] $wait_vis fn wait(self) -> $output { use $crate::EventListenerFuture; self._inner.into_inner().wait() } + #[allow(dead_code)] pub(crate) fn poll_with_strategy<'__strategy, __S: $crate::Strategy<'__strategy>>( self: ::core::pin::Pin<&'__strategy mut Self>, strategy: &mut __S, @@ -502,3 +504,27 @@ impl Future for Ready { Poll::Ready(()) } } + +#[doc(hidden)] +pub mod __demonstration_for_public_api_warnings { + use super::*; + + easy_wrapper! { + pub struct Demonstration(Inner => ()); + pub(crate) wait(); + } + + struct Inner(T); + + impl EventListenerFuture for Inner { + type Output = (); + + fn poll_with_strategy<'a, S: Strategy<'a>>( + self: Pin<&mut Self>, + _strategy: &mut S, + _context: &mut S::Context, + ) -> Poll { + Poll::Ready(()) + } + } +}