!Sized support
Ten0 opened this issue · 6 comments
Arc does not have a Sized
requirement for its use, however due to a lacking ?Sized
bound on impl RefCnt for Arc
, this library can't be used to store e.g. ArcSwap<dyn Config>
.
Is there a technical limitation that prevents this? Or could it be implemented?
I haven't found it in the documentation though
It is indeed a bit buried in there. But AFAIK this is not the first thing someone coming to the crate needs to know.
https://docs.rs/arc-swap/1.3.1/arc_swap/docs/limitations/index.html
It would be great if the crate could somehow supply an error hint when that happens, but I don't know of a way to do that :-|
It would be great if the crate could somehow supply an error hint when that happens, but I don't know of a way to do that :-|
Unfortunately that feature does not exist. This is something Diesel has been looking for for a while as well.
The feature doesn't, but I wouldn't be too surprised if someone came up with a hack, like making the compiler output something like types don't match, expected: WeDontSupportUnsizedSeeTheDocsWhy
😈
The feature doesn't, but I wouldn't be too surprised if someone came up with a hack, like making the compiler output something like
types don't match, expected: WeDontSupportUnsizedSeeTheDocsWhy
smiling_imp