You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`once_cell` is now part of std, so switch over to it almost everywhere,
and add lints for it.
This is purely mechanical -- there are no semantic changes compared to
`once_cell`.
There's one place that still needs `once_cell`'s `try_`, so keep that
around. See rust-lang/rust#109737.
{ path = "async_bb8_diesel::AsyncConnection::transaction_async", reason = "Prefer to use transaction_retry_wrapper, if possible. For tests and nested transactions, use transaction_non_retry_wrapper to at least get dtrace probes" },
19
+
20
+
# We use disallowed-methods for these rather than disallowed-types, because
21
+
# there's still one legitimate use for `once_cell`'s types:
22
+
# `get_or_try_init`, which isn't stablet yet.
23
+
# https://github.com/rust-lang/rust/issues/109737
24
+
{ path = "once_cell::unsync::OnceCell::get_or_init", reason = "use `std::cell::OnceCell` instead, unless you need get_or_try_init in which case #[expect] this lint" },
25
+
{ path = "once_cell::sync::OnceCell::get_or_init", reason = "use `std::sync::OnceLock` instead, unless you need get_or_try_init in which case #[expect] this lint" },
0 commit comments