Available add-ons Advanced Security Enterprise-grade security features GitHub Copilot Enterprise-grade AI features Premium Support Enterprise-grade 24/7 support Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of ...
// We call `place_to_op` which will be an `MPlaceTy` whenever there exists // an mplace for this place. (This is in contrast to `PlaceTy::as_mplace_or_local` // which can return a local even if that has an mplace.) let place = self.eval_place(*place)?; let op = self...
I can’t say that this book blew my mind, but it has a unique position - it targets people who already know rust and want to level up. And it delivers. If you don’t know rust it will be pretty much inaccessible, but if you - it’s a joy to read. […] Bugzmanov on goodrea...
If the value in a variable is moved, no lines can be drawn from it any more. In this model, a variable only exists so long as it holds a legal value; you cannot draw lines from a variable whose value is uninitialized or has been moved, so effectively it isn't there. Using this ...
The maximum number for repr(align(N)) is now 2²⁹. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases. The .description() method on the std::error::Error trait has been soft-deprecated. It is no longer...
In this example, I believe that what's happening is that u_mut becomes inaccessible so long as _c_mut exists, so there's no way to exercise the UnsafeCell disagreement. Not only is this accepted by Miri in practice, it's also codified in the UnsafeCell methods get_mut (stable) and fr...
insert(String::from("Yellow"), 50); // check if entry with a key exists and add if doesn't hm.entry(String::from("Yellow")).or_insert(50); // get value be a key let val = hm.get("Yellow"); // iterate for (key, value) in &hm { println!("{}: {}", key, value); ...
If it's not clear why a particular piece of code exists or why it needs to be written the way it is, I consider that a bug which should be fixed by either rewriting the code more clearly or adding comments explaining it. Currently, most game state is managed by generational arenas ...
This has been discussed to death back when mem::forget was stabilized; the signature of mem::forget is exactly identical to any other function that consumes a value and the function itself is equivalent to "put the object somewhere inaccessible to the rest of the code"....
The basic idea for epoch-based GC is that in our lock-free structures, we may end up making certain data inaccessible via a CAS on a node somewhere, but that doesn't mean that there isn't already some thread that is operating on it. We use epochs to track when a structure is marked...