One weird misconception I’ve seen popping up is that Rust’s borrow check is only relevant to heap-allocated data.
-
Show this thread
-
(This is used to argue, for example, that Rust isn’t giving you any safety for embedded devices and you might as well write in C.)
3 replies 1 retweet 16 likesShow this thread
Simple example of how the borrow check is important: let mut x: Result<i32,f32> = Ok(1); let y: &i32 = http://x.as _ref().unwrap(); x = Err(1.0); println!(“{}”, y); // unsafe cast of int to float in safe code
9:11 PM - 12 Jul 2019
0 replies
2 retweets
23 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.