Rust 1.19 is out. That means that `union union<'union> { union: &'union union<'union> }` is valid in stable Rust now!
-
-
-
Replying to @Nashenas88
Defining a union is fine. Accessing it requires unsafe.
1 reply 0 retweets 0 likes -
Replying to @JakeGoulding
Ohh. I didn't realize that. Is actually possible to construct this? I thought recursive structures can't have a size.
1 reply 0 retweets 0 likes -
Replying to @Nashenas88 @JakeGoulding
It's not actually recursive, it holds a reference. (assuming I parsed that right...)
2 replies 0 retweets 0 likes -
Replying to @TedMielczarek @JakeGoulding
If there was an Option I would think so. But, how would you construct one of these?
1 reply 0 retweets 0 likes
Replying to @Nashenas88 @TedMielczarek
I don't believe it's possible to safely construct it. You could try a trick like mem::uninitialized, but still probably hit mutable borrows.
7:13 AM - 21 Jul 2017
0 replies
0 retweets
0 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.