Skip to content

Commit 98e35fa

Browse files
committed
Change deprecated alias from use to type.
`#[deprecated` doesn't work on re-exports (rust-lang/rust#30827).
1 parent cf96d1e commit 98e35fa

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ pub use store::{Store, StoreLock, StoreLockListener};
189189
mod util;
190190

191191
#[deprecated = "use `Log` instead of `Sink`"]
192-
pub use Log as Sink;
192+
#[allow(missing_docs)]
193+
pub type Sink<M> = Log<M>;
193194
#[deprecated = "use `LogListener` instead of `SinkListener`"]
194-
pub use LogListener as SinkListener;
195+
#[allow(missing_docs)]
196+
pub type SinkListener<M> = LogListener<M>;
195197

196198
// -------------------------------------------------------------------------------------------------
197199

tests/api/static_properties.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,9 @@ const _: () = {
151151
assert_impl_all!(nosy::future::WakeFlagListener: Clone, Send, Sync, Unpin, RefUnwindSafe, UnwindSafe);
152152
}
153153
};
154+
155+
// Test that deprecations are as expected
156+
#[expect(unused, deprecated)]
157+
use nosy::Sink as SinkIsDeprecated;
158+
#[expect(unused, deprecated)]
159+
use nosy::SinkListener as SinkListenerIsDeprecated;

0 commit comments

Comments
 (0)