1.13.0 #
- Released on: 10 November, 2016
- Branched from master on: 23 September, 2016
Language #
- Stabilize the
?
operator.?
is a simple way to propagate errors, like thetry!
macro, described in RFC 0243. - Stabilize macros in type position. Described in RFC 873.
- Stabilize attributes on statements. Described in RFC 0016.
- Fix
#[derive]
for empty tuple structs/variants - Fix lifetime rules for ‘if’ conditions
- Avoid loading and parsing unconfigured non-inline modules
Compiler #
- Add the
-C link-arg
argument - Remove the old AST-based backend from rustc_trans
- Don’t enable NEON by default on armv7 Linux
- Fix debug line number info for macro expansions
- Do not emit “class method” debuginfo for types that are not DICompositeType
- Warn about multiple conflicting #[repr] hints
- When sizing DST, don’t double-count nested struct prefixes
- Default RUST_MIN_STACK to 16MiB for now
- Improve rlib metadata format. Reduces rlib size significantly.
- Reject macros with empty repetitions to avoid infinite loop
- Expand macros without recursing to avoid stack overflows
Diagnostics #
- Replace macro backtraces with labeled local uses
- Improve error message for misplaced doc comments
- Buffer unix and lock windows to prevent message interleaving
- Update lifetime errors to specifically note temporaries
- Special case a few colors for Windows
- Suggest
use self
when such an import resolves - Be more specific when type parameter shadows primitive type
- Many minor improvements
Compile-time Optimizations #
- Compute and cache HIR hashes at beginning
- Don’t hash types in loan paths
- Cache projections in trans
- Optimize the parser’s last token handling
- Only instantiate #[inline] functions in codegen units referencing them. This leads to big improvements in cases where crates export define many inline functions without using them directly.
- Lazily allocate TypedArena’s first chunk
- Don’t allocate during default HashSet creation
Stabilized APIs #
Libraries #
- Add
assert_ne!
anddebug_assert_ne!
- Make
vec_deque::Drain
,hash_map::Drain
, andhash_set::Drain
covariant - Implement
AsRef<[T]>
forstd::slice::Iter
- Implement
Debug
forstd::vec::IntoIter
CString
: avoid excessive growth just to 0-terminate- Implement
CoerceUnsized
for{Cell, RefCell, UnsafeCell}
- Use arc4rand on FreeBSD
- memrchr: Correct aligned offset computation
- Improve Demangling of Rust Symbols
- Use monotonic time in condition variables
- Implement
Debug
forstd::path::{Components,Iter}
- Implement conversion traits for
char
- Fix illegal instruction caused by overflow in channel cloning
- Zero first byte of CString on drop
- Inherit overflow checks for sum and product
- Add missing Eq implementations
- Implement
Debug
forDirEntry
- When
getaddrinfo
returnsEAI_SYSTEM
retrieve actual error fromerrno
SipHasher
is deprecated. UseDefaultHasher
.- Implement more traits for
std::io::ErrorKind
- Optimize BinaryHeap bounds checking
- Work around pointer aliasing issue in
Vec::extend_from_slice
,extend_with_element
- Fix overflow checking in unsigned pow()
Cargo #
- This release includes security fixes to both curl and OpenSSL.
- Fix transitive doctests when panic=abort
- Add –all-features flag to cargo
- Reject path-based dependencies in
cargo package
- Don’t parse the home directory more than once
- Don’t try to generate Cargo.lock on empty workspaces
- Update OpenSSL to 1.0.2j
- Add license and license_file to cargo metadata output
- Make crates-io registry URL optional in config; ignore all changes to source.crates-io
- Don’t download dependencies from other platforms
- Build transitive dev-dependencies when needed
- Add support for per-target rustflags in .cargo/config
- Avoid updating registry when adding existing deps
- Warn about path overrides that won’t work
- Use workspaces during
cargo install
- Leak mspdbsrv.exe processes on Windows
- Add –message-format flag
- Pass target environment for rustdoc
- Use
CommandExt::exec
forcargo run
on Unix - Update curl and curl-sys
- Call rustdoc test with the correct cfg flags of a package
Tooling #
- rustdoc: Add the
--sysroot
argument - rustdoc: Fix a couple of issues with the search results
- rustdoc: remove the
!
from macro URLs and titles - gdb: Fix pretty-printing special-cased Rust types
- rustdoc: Filter more incorrect methods inherited through Deref
Misc #
- Remove unmaintained style guide
- Add s390x support
- Initial work at Haiku OS support
- Add mips-uclibc targets
- Crate-ify compiler-rt into compiler-builtins
- Add rustc version info (git hash + date) to dist tarball
- Many documentation improvements
Compatibility Notes #
SipHasher
is deprecated. UseDefaultHasher
.- Deny (by default) transmuting from fn item types to pointer-sized types. Continuing the long transition to zero-sized fn items, per RFC 401.
- Fix
#[derive]
for empty tuple structs/variants. Part of RFC 1506. - Issue deprecation warnings for safe accesses to extern statics
- Fix lifetime rules for ‘if’ conditions.
- Inherit overflow checks for sum and product.
- Forbid user-defined macros named “macro_rules”.