Rust pop quiz: `struct Foo {x: [u8], y: [u8]}`. `Box<Foo>` is:
-
-
-
Replying to @sgrif @ManishEarth
Also I don't think Foo can even exist even if only b was? Only generic types can really be unsized.
3 replies 0 retweets 0 likes -
Replying to @Gankra_ @ManishEarth
IIRC any struct can become unsized by containing an unsized type, but it must be the last field.
1 reply 0 retweets 1 like -
Replying to @sgrif @ManishEarth
the problem is there's no way to init it (without unsafe casts). You need to take a Foo<[u8; n]> and cast to Foo<[u8]>.
1 reply 0 retweets 0 likes -
Oh, you mean construction. Well. Yes.
1 reply 0 retweets 0 likes
Replying to @ManishEarth
Actually constructing values is so 2016. We do all our computation at the type level now.
0 replies
1 retweet
6 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.