Yes. Our uses of
Vec<Binned> would have to be
Vec<(Binned,)>. We're okay with this.
Why would it be? The inner binned can't touch the outer binned's fields, nothing unsafe about this.
We do have plenty of structs that we put in vecs that would become smaller to various extents. We can't measure it (because this feature doesn't exist), but we do expect size reductions all around.
Additionally, the codegen for this:
#[repr(binned)] struct Foo(u32, u8); struct Bar(Foo, u16); Bar(foo, 0)
is literally free.
Vec could do it (
Vec::iter_mut_binned or something), but yes, we're assuming you can control where the
&mut comes from, and hoping the cases where you can, make up for the cases where you can't.