enum Program { Bad { source: String }, Good, }
-
-
Replying to @mountain_ghosts
This is insufficient, since someone can still construct `Program::Good`. What you need is: enum GoodProgram {} enum Program { Bad { source: String }, Good(GoodProgram), } Ever having an instance of GoodProgram (and this Program::Good) is now undefined behavior
1 reply 0 retweets 3 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.