Version 1.14.0 (2016-12-22)
Language
..matches multiple tuple fields in enum variants, structs and tuples. RFC 1492.- Safe
fnitems can be coerced tounsafe fnpointers use *anduse ::*both glob-import from the crate root- It's now possible to call a
Vec<Box<Fn()>>without explicit dereferencing
Compiler
- Mark enums with non-zero discriminant as non-zero
- Lower-case
static mutnames are linted like other statics and consts - Fix ICE on some macros in const integer positions
(e.g.
[u8; m!()]) - Improve error message and snippet for "did you mean
x" - Add a panic-strategy field to the target specification
- Include LLVM version in
--version --verbose
Compile-time Optimizations
- Improve macro expansion performance
- Shrink
Expr_::ExprInlineAsm - Replace all uses of SHA-256 with BLAKE2b
- Reduce the number of bytes hashed by
IchHasher - Avoid more allocations when compiling html5ever
- Use
SmallVectorinCombineFields::instantiate - Avoid some allocations in the macro parser
- Use a faster deflate setting
- Add
ArrayVecandAccumulateVecto reduce heap allocations during interning of slices - Optimize
write_metadata - Don't process obligation forest cycles when stalled
- Avoid many
CrateConfigclones - Optimize
Substs::super_fold_with - Optimize
ObligationForest'sNodeStatehandling - Speed up
plug_leaks
Libraries
println!(), with no arguments, prints newline. Previously, an empty string was required to achieve the same.Wrappingimpls standard binary and unary operators, as well as theSumandProductiterators- Implement
From<Cow<str>> for StringandFrom<Cow<[T]>> for Vec<T> - Improve
foldperformance forchain,cloned,map, andVecDequeiterators - Improve
SipHasherperformance on small values - Add Iterator trait TrustedLen to enable better FromIterator / Extend
- Expand
.zip()specialization to.map()and.cloned() ReadDirimplementsDebug- Implement
RefUnwindSafefor atomic types - Specialize
Vec::extendtoVec::extend_from_slice - Avoid allocations in
Decoder::read_str io::ErrorimplementsFrom<io::ErrorKind>- Impl
Debugfor raw pointers to unsized data - Don't reuse
HashMaprandom seeds - The internal memory layout of
HashMapis more cache-friendly, for significant improvements in some operations HashMapuses less memory on 32-bit architectures- Impl
Add<{str, Cow<str>}>forCow<str>
Cargo
- Expose rustc cfg values to build scripts
- Allow cargo to work with read-only
CARGO_HOME - Fix passing --features when testing multiple packages
- Use a single profile set per workspace
- Load
replacesections from lock files - Ignore
panicconfiguration for test/bench profiles
Tooling
- rustup is the recommended Rust installation method
- This release includes host (rustc) builds for Linux on MIPS, PowerPC, and
S390x. These are tier 2 platforms and may have major defects. Follow the
instructions on the website to install, or add the targets to an existing
installation with
rustup target add. The new target triples are:mips-unknown-linux-gnumipsel-unknown-linux-gnumips64-unknown-linux-gnuabi64mips64el-unknown-linux-gnuabi64powerpc-unknown-linux-gnupowerpc64-unknown-linux-gnupowerpc64le-unknown-linux-gnus390x-unknown-linux-gnu
- This release includes target (std) builds for ARM Linux running MUSL
libc. These are tier 2 platforms and may have major defects. Add the
following triples to an existing rustup installation with
rustup target add:arm-unknown-linux-musleabiarm-unknown-linux-musleabihfarmv7-unknown-linux-musleabihf
- This release includes experimental support for WebAssembly, via
the
wasm32-unknown-emscriptentarget. This target is known to have major defects. Please test, report, and fix. - rustup no longer installs documentation by default. Run
rustup component add rust-docsto install. - Fix line stepping in debugger
- Enable line number debuginfo in releases
Misc
- Disable jemalloc on aarch64/powerpc/mips
- Add support for Fuchsia OS
- Detect local-rebuild by only MAJOR.MINOR version
Compatibility Notes
- A number of forward-compatibility lints used by the compiler
to gradually introduce language changes have been converted
to deny by default:
- "use of inaccessible extern crate erroneously allowed"
- "type parameter default erroneously allowed in invalid location"
- "detects super or self keywords at the beginning of global path"
- "two overlapping inherent impls define an item with the same name were erroneously allowed"
- "floating-point constants cannot be used in patterns"
- "constants of struct or enum type can only be used in a pattern if
the struct or enum has
#[derive(PartialEq, Eq)]" - "lifetimes or labels named
'_were erroneously allowed"
- Prohibit patterns in trait methods without bodies
- The atomic
Orderingenum may not be matched exhaustively - Future-proofing
#[no_link]breaks some obscure cases - The
$cratemacro variable is accepted in fewer locations - Impls specifying extra region requirements beyond the trait they implement are rejected
- Enums may not be unsized. Unsized enums are intended to work but never have. For now they are forbidden.
- Enforce the shadowing restrictions from RFC 1560 for today's macros