Rust Rolls Out Version 1.38.0

Rust 1.38.0, featuring pipelined compilation is now available.

Recently, the Rust team announced a new version of Rust, 1.38.0. featuring pipelined compilation.
 
You can update to the latest version Rust 1.38.0 using: $ rustup update stable
 
The Rust team said via a blog post that to compile a crate, the compiler doesn't require the dependencies to be fully built. It just needs their "metadata" and this metadata is produced early in the compilation process.
 
With version 1.38.0, Cargo takes advantage of this by automatically starting to build dependent crates as soon as metadata is ready. There are reports of up to 20% compilation speed increases for optimized, clean builds of some crate graphs.
 
Another change is that starting with 1.38.0, rustc will provide a lint for a narrow class of incorrect initializations using mem::uninitialized or mem::zeroed.
 
As, it is undefined behavior for types like &T and Box<T>, to contain an all-0 bit pattern, since they represent pointer-like objects that cannot be null. It is, consequently, an error to use mem::uninitialized or mem::zeroed to initialize one of these types. The new lint will attempt to alert whenever one of those functions is used to initialize one of them.
 
So, now the below code will emit a warning.
  1. struct Wrap<T>(T);  
  2. struct Outer(Wrap<Wrap<Wrap<Box<i32>>>>);  
  3. struct CannotBeZero {  
  4. outer: Outer,  
  5. foo: i32,  
  6. bar: f32  
  7. }  
  8.   
  9. ...  
  10.   
  11. let bad_value: CannotBeZero = unsafe { std::mem::uninitialized() };   
Source: .rust-lang.org
 
Rust 1.38.0 extends the #[deprecated] attribute, allowing it to be applied to macros as well.
 
You can now use std::any::type_name to get the name of a type.
 
Some of the important library changes are:
  • slice::{concat, connect, join} now accepts &[T] in addition to &T.
  • *const T and *mut T now implement marker::Unpin.
  • Arc<[T]> and Rc<[T]> now implement FromIterator<T>.
  • iter::{StepBy, Peekable, Take} now implement DoubleEndedIterator.