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
Compared to alloc::boxed::Box, this can not be used to run a FnOnce from an owned pointer; it'd be great if that worked.
The test below currently fails to build ("the size of dyn FnOnce() cannot be statically determined"), whereas replacing BoxS with Box (and boxed_s! with Box::new) just works.
We could probably impl<Args> FnOnce(Args) for BoxS<T> where T: FnOnce(Args), but AIU that's blocked by rust-lang/rust#29625. Having a nightly feature would be an option, but given that this crate has worked for years without updates (and nightly features would be a constant whack-a-mole), probably not.
Compared to
alloc::boxed::Box
, this can not be used to run a FnOnce from an owned pointer; it'd be great if that worked.The test below currently fails to build ("the size of
dyn FnOnce()
cannot be statically determined"), whereas replacingBoxS
withBox
(andboxed_s!
withBox::new
) just works.We could probably
impl<Args> FnOnce(Args) for BoxS<T> where T: FnOnce(Args)
, but AIU that's blocked by rust-lang/rust#29625. Having a nightly feature would be an option, but given that this crate has worked for years without updates (and nightly features would be a constant whack-a-mole), probably not.The text was updated successfully, but these errors were encountered: