Answer: (d). Structs may only have one dynamically sized field, and it must be at the end. No fundamental reason why this cannot be improvedhttps://twitter.com/ManishEarth/status/826901138347683841 …
-
-
Replying to @ManishEarth
How do I make a value of type `struct Foo {x: [u8] }`?
2 replies 0 retweets 0 likes -
Replying to @BRIAN_____
You can't. It has to be generic (`Foo<T: ?Sized> {x: T}`) and then you can CoerceUnsized it.
1 reply 0 retweets 0 likes
Replying to @ManishEarth
Maybe soon. See https://github.com/llogiq/rfcs/blob/alloca/text/0000-alloca.md ….
6:07 PM - 2 Feb 2017
0 replies
0 retweets
1 like
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.