Honestly, I learn the most about Rust details through tweets like these. It's like a slow drip of information that will keep me from making mistakes later in the future. I want the Rustonomicon in daily-"Did You Know"-tear-off-calendar form.https://twitter.com/myrrlyn/status/1153369298779430914 …
-
-
Replying to @bitshiftmask
Here's to hoping Miri will allow us to eventually not have to remember these C:
2 replies 0 retweets 1 like -
Replying to @yoshuawuyts @bitshiftmask
I'm still holding out for &uninit honestly
1 reply 0 retweets 1 like -
Replying to @myrrlyn @bitshiftmask
My unsafe knowledge is quite limited; what would that be for?
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @bitshiftmask
It's a write-once pointer to an uninitialized T; it (if it existed) moves MaybeUninit from being a property of the slot to a property of the access, and enables placement-new Unfortunately tyck doesn't have linear types or the ability to adequately uninitialized slots
1 reply 0 retweets 1 like -
The closest Rust has is currently let val: T; // uninit slot if cond { val = T::one(); } else { val = T::two(); } where "val =" are deferred initialization writes, same as &uninit would allow.
1 reply 0 retweets 1 like
Ahh, okay! -- I think I follow what you're saying. Thanks for explaining!
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.