Relax sized-ness constraint on `RefCnt`
mraerino opened this issue · 1 comments
mraerino commented
if i try to use the type ArcSwap<[T]>
i'd expect it to be able to use a fat pointer the same way it works for Arc<[T]>
instead i get this compiler error:
error[E0277]: the size for values of type `[T]` cannot be known at compilation time
--> src/proxy/origin.rs:47:24
|
47 | live_destinations: Arc<ArcSwap<[T]>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
::: /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.4.7/src/lib.rs:686:26
|
686 | pub struct ArcSwapAny<T: RefCnt, S: LockStorage = Global> {
| ------ required by this bound in `arc_swap::ArcSwapAny`
|
= help: the trait `std::marker::Sized` is not implemented for `[T]`
= note: required because of the requirements on the impl of `arc_swap::RefCnt` for `std::sync::Arc<[T]>`
(note: T is sized)
is there a way to relax this constraint?