Rust versions / 1.14
Rust release · Dec 22, 2016
Rust 1.14: what's new, what was stabilized
Short answerRust 1.14 was released on Dec 22, 2016: 8 compatibility notes that can affect existing code.
← Rust 1.13All versionsRust 1.15 →
Can it break my build?
The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:
- [A number of forward-compatibility lints used by the compiler
- [Prohibit patterns in trait methods without bodies][37378]
- [The atomic
Orderingenum may not be matched exhaustively][37351] - [Future-proofing
#[no_link]breaks some obscure cases][37247] - [The
$cratemacro variable is accepted in fewer locations][37213] - [Impls specifying extra region requirements beyond the trait
- [Enums may not be unsized][37111]. Unsized enums are intended to
- [Enforce the shadowing restrictions from RFC 1560 for today's macros][36767]
Use it
rustup update stable # get the newest release
rustup install 1.14 # or exactly this one
rustup override set 1.14 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.14" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Language
- [
..matches multiple tuple fields in enum variants, structs and tuples][36843]. [RFC 1492]. - [Safe
fnitems can be coerced tounsafe fnpointers][37389] - [
use *anduse ::*both glob-import from the crate root][37367] - [It's now possible to call a
Vec<Box<Fn()>>without explicit dereferencing][36822]
Compiler
- [Mark enums with non-zero discriminant as non-zero][37224]
- [Lower-case
static mutnames are linted like other statics and consts][37162] - [Fix ICE on some macros in const integer positions (e.g.
[u8; m!()])][36819] - [Improve error message and snippet for "did you mean
x"][36798] - [Add a panic-strategy field to the target specification][36794]
- [Include LLVM version in
--version --verbose][37200]
Compile-time Optimizations
- [Improve macro expansion performance][37569]
- [Shrink
Expr_::ExprInlineAsm][37445] - [Replace all uses of SHA-256 with BLAKE2b][37439]
- [Reduce the number of bytes hashed by
IchHasher][37427] - [Avoid more allocations when compiling html5ever][37373]
- [Use
SmallVectorinCombineFields::instantiate][37322] - [Avoid some allocations in the macro parser][37318]
- [Use a faster deflate setting][37298]
- [Add
ArrayVecandAccumulateVecto reduce heap allocations during interning of slices][37270] - [Optimize
write_metadata][37267] - [Don't process obligation forest cycles when stalled][37231]
- [Avoid many
CrateConfigclones][37161] - [Optimize
Substs::super_fold_with][37108] - [Optimize
ObligationForest'sNodeStatehandling][36993] - [Speed up
plug_leaks][36917]
Libraries
- [
println!(), with no arguments, prints newline][36825]. Previously, an empty string was required to achieve the same. - [
Wrappingimpls standard binary and unary operators, as well as theSumandProductiterators][37356] - [Implement
From<Cow<str>> for StringandFrom<Cow<[T]>> for Vec<T>][37326] - [Improve
foldperformance forchain,cloned,map, andVecDequeiterators][37315] - [Improve
SipHasherperformance on small values][37312] - [Add Iterator trait TrustedLen to enable better FromIterator / Extend][37306]
- [Expand
.zip()specialization to.map()and.cloned()][37230] - [
ReadDirimplementsDebug][37221] - [Implement
RefUnwindSafefor atomic types][37178] - [Specialize
Vec::extendtoVec::extend_from_slice][37094] - [Avoid allocations in
Decoder::read_str][37064] - [
io::ErrorimplementsFrom<io::ErrorKind>][37037] - [Impl
Debugfor raw pointers to unsized data][36880] - [Don't reuse
HashMaprandom seeds][37470] - [The internal memory layout of
HashMapis more cache-friendly, for significant improvements in some operations][36692] - [
HashMapuses less memory on 32-bit architectures][36595] - [Impl
Add<{str, Cow<str>}>forCow<str>][36430]
Cargo
- [Expose rustc cfg values to build scripts][cargo/3243]
- [Allow cargo to work with read-only
CARGO_HOME][cargo/3259] - [Fix passing --features when testing multiple packages][cargo/3280]
- [Use a single profile set per workspace][cargo/3249]
- [Load
replacesections from lock files][cargo/3220] - [Ignore
panicconfiguration for test/bench profiles][cargo/3175]
Tooling
- [rustup is the recommended Rust installation method][1.14rustup]
- 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][1.14wasm], 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][37310]
- [Enable line number debuginfo in releases][37280]
Misc
- [Disable jemalloc on aarch64/powerpc/mips][37392]
- [Add support for Fuchsia OS][37313]
- [Detect local-rebuild by only MAJOR.MINOR version][37273]
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)]"]36891 - "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]37247 - 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
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.15Released Feb 2, 2017.Read it next →Also worth your time
Did this answer your question?