// FIXME: `h` should be a handle to the current module and what `pv` should be is unknown // but both are ignored by std. this.call_function( thread_callback, Abi::System { unwind: false }, &[Scalar::null_ptr(t
You can use variable shadowing without moving the original variable to make it inaccessible, but this won't kill any outstanding borrows on its own... fn example() { let mut s = String::new(); let r = &mut s; // Haha, no `mut`! let s = (); // ...drat r.push_str(".....
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...
destructor will run exactly once, preventing double-frees, dangling pointers, various null pointer related bugs, etc... When an object is created inside a function's scope, it exists as the property of that scope. The object's lifetime is the same as the lifetime of the scope that ...
The '_ lifetime is now stable. The underscore lifetime can be used anywhere where a lifetime can be elided. impl Trait is now stable allowing you to have abstract types in returns or in function parameters. e.g. fn foo() -> impl Iterator<Item=u8> or fn open(path: impl AsRef<Path...
This means that for rustc, LLVM is now using jemalloc, which results in a 6% compile-time improvement on a specific workload. Avoid quadratic growth in function size due to cleanups. Misc 32-bit MSVC builds finally implement unwinding. i686-pc-windows-msvc is now considered a tier-1 ...