Rust versions / 1.11
Rust release · Aug 18, 2016
Rust 1.11: what's new, what was stabilized
Short answerRust 1.11 was released on Aug 18, 2016: 13 newly stable APIs (BinaryHeap::append, BTreeMap::append, BTreeMap::split_off, BTreeSet::append, ...); 3 compatibility notes that can affect existing code.
← Rust 1.10All versionsRust 1.12 →
13 APIs stabilized
BinaryHeap::append, BTreeMap::append, BTreeMap::split_off, BTreeSet::append, BTreeSet::split_off, f32::to_degrees, f32::to_radians, f64::to_degrees, f64::to_radians, Iterator::sum, Iterator::product, Cell::get_mut, RefCell::get_mut
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:
consts andstatics may not have unsized types- [The new follow-set rules that place restrictions on
macro_rules! cfgattribute process has been refactored to fix various bugs.
Use it
rustup update stable # get the newest release
rustup install 1.11 # or exactly this one
rustup override set 1.11 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.11" 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
- Support nested
cfg_attrattributes - Allow statement-generating braced macro invocations at the end of blocks
- Macros can be expanded inside of trait definitions
- [
#[macro_use]works properly when it is itself expanded from a macro](https://github.com/rust-lang/rust/pull/34032)
Stabilized APIs
BinaryHeap::appendBTreeMap::appendBTreeMap::split_offBTreeSet::appendBTreeSet::split_offf32::to_degrees(in libcore - previously stabilized in libstd)f32::to_radians(in libcore - previously stabilized in libstd)f64::to_degrees(in libcore - previously stabilized in libstd)f64::to_radians(in libcore - previously stabilized in libstd)Iterator::sumIterator::productCell::get_mutRefCell::get_mut
Libraries
- The
thread_local!macro supports multiple definitions in a single invocation, and can apply attributes CowimplementsDefaultWrappingimplements binary, octal, lower-hex and upper-hexDisplayformatting- The range types implement
Hash lookup_hostignores unknown address typesassert_eq!accepts a custom error message, likeassert!does- The main thread is now called "main" instead of "<main>"
Cargo
- Disallow specifying features of transitive deps
- Add color support for Windows consoles
- [Fix
harness = falseon[lib]sections](https://github.com/rust-lang/cargo/pull/2795) - Don't panic when
linkscontains a '.' - Build scripts can emit warnings, and
-vvprints warnings for all crates. - Ignore file locks on OS X NFS mounts
- Don't warn about
package.metadatakeys. This provides room for expansion by arbitrary tools. - Add support for cdylib crate types
- Prevent publishing crates when files are dirty
- Don't fetch all crates on clean
- Propagate --color option to rustc
- Fix
cargo doc --openon Windows - Improve autocompletion
- Configure colors of stderr as well as stdout
Performance
- Caching projections speeds up type check dramatically for some workloads
- The default
HashMaphasher is SipHash 1-3 instead of SipHash 2-4 This hasher is faster, but is believed to provide sufficient protection from collision attacks. - Comparison of
Ipv4Addris 10x faster
Rustdoc
- Fix empty implementation section on some module pages
- Fix inlined renamed re-exports in import lists
- Fix search result layout for enum variants and struct fields
- Fix issues with source links to external crates
- Fix redirect pages for renamed re-exports
Tooling
- rustc is better at finding the MSVC toolchain
- When emitting debug info, rustc emits frame pointers for closures, shims and glue, as it does for all other functions
- rust-lldb warns about unsupported versions of LLDB
- Many more errors have been given error codes and extended explanations
- API documentation continues to be improved, with many new examples
Misc
- rustc no longer hangs when dependencies recursively re-export submodules
- rustc requires LLVM 3.7+
- The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was rewritten
- rustc support 16-bit pointer sizes. No targets use this yet, but it works toward AVR support.
Compatibility Notes
consts andstatics may not have unsized types- The new follow-set rules that place restrictions on
macro_rules!in order to ensure syntax forward-compatibility have been enabled This was an amendment to RFC 550, and has been a warning since 1.10. cfgattribute process has been refactored to fix various bugs. This causes breakage in some corner cases.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.12Released Sep 29, 2016.Read it next →Also worth your time
Did this answer your question?