Version 1.15.1 (2017-02-09)
Version 1.15.0 (2017-02-02)
Language
- Basic procedural macros allowing custom
#[derive]
, aka "macros 1.1", are stable. This allows popular code-generating crates like Serde and Diesel to work ergonomically. RFC 1681. - Tuple structs may be empty. Unary and empty tuple structs may be instantiated with curly braces. Part of RFC 1506.
- A number of minor changes to name resolution have been activated.
They add up to more consistent semantics, allowing for future evolution of
Rust macros. Specified in RFC 1560, see its section on "changes" for
details of what is different. The breaking changes here have been transitioned
through the
legacy_imports
lint since 1.14, with no known regressions. - In
macro_rules
,path
fragments can now be parsed as type parameter bounds ?Sized
can be used inwhere
clauses- There is now a limit on the size of monomorphized types and it can be
modified with the
#![type_size_limit]
crate attribute, similarly to the#![recursion_limit]
attribute
Compiler
- On Windows, the compiler will apply dllimport attributes when linking to extern functions. Additional attributes and flags can control which library kind is linked and its name. RFC 1717.
- Rust-ABI symbols are no longer exported from cdylibs
- The
--test
flag works with procedural macro crates - Fix
extern "aapcs" fn
ABI - The
-C no-stack-check
flag is deprecated. It does nothing. - The
format!
expander recognizes incorrectprintf
and shell-style formatting directives and suggests the correct format. - Only report one error for all unused imports in an import list
Compiler Performance
- Avoid unnecessary
mk_ty
calls inTy::super_fold_with
- Avoid more unnecessary
mk_ty
calls inTy::super_fold_with
- Don't clone in
UnificationTable::probe
- Remove
scope_auxiliary
to cut RSS by 10% - Use small vectors in type walker
- Macro expansion performance was improved
- Change
HirVec<P<T>>
toHirVec<T>
inhir::Expr
- Replace FNV with a faster hash function
Stabilized APIs
std::iter::Iterator::min_by
std::iter::Iterator::max_by
std::os::*::fs::FileExt
std::sync::atomic::Atomic*::get_mut
std::sync::atomic::Atomic*::into_inner
std::vec::IntoIter::as_slice
std::vec::IntoIter::as_mut_slice
std::sync::mpsc::Receiver::try_iter
std::os::unix::process::CommandExt::before_exec
std::rc::Rc::strong_count
std::rc::Rc::weak_count
std::sync::Arc::strong_count
std::sync::Arc::weak_count
std::char::encode_utf8
std::char::encode_utf16
std::cell::Ref::clone
std::io::Take::into_inner
Libraries
- The standard sorting algorithm has been rewritten for dramatic performance improvements. It is a hybrid merge sort, drawing influences from Timsort. Previously it was a naive merge sort.
Iterator::nth
no longer has aSized
boundExtend<&T>
is specialized forVec
whereT: Copy
to improve performance.chars().count()
is much faster and so arechars().last()
andchar_indices().last()
- Fix ARM Objective-C ABI in
std::env::args
- Chinese characters display correctly in
fmt::Debug
- Derive
Default
forDuration
- Support creation of anonymous pipes on WinXP/2k
mpsc::RecvTimeoutError
implementsError
- Don't pass overlapped handles to processes
Cargo
- In this release, Cargo build scripts no longer have access to the
OUT_DIR
environment variable at build time viaenv!("OUT_DIR")
. They should instead check the variable at runtime withstd::env
. That the value was set at build time was a bug, and incorrect when cross-compiling. This change is known to cause breakage. - Add
--all
flag tocargo test
- Compile statically against the MSVC CRT
- Mix feature flags into fingerprint/metadata shorthash
- Link OpenSSL statically on OSX
- Apply new fingerprinting to build dir outputs
- Test for bad path overrides with summaries
- Require
cargo install --vers
to take a semver version - Fix retrying crate downloads for network errors
- Implement string lookup for
build.rustflags
config key - Emit more info on --message-format=json
- Assume
build.rs
in the same directory asCargo.toml
is a build script - Don't ignore errors in workspace manifest
- Fix
--message-format JSON
when rustc emits non-JSON warnings
Tooling
- Test runners (binaries built with
--test
) now support a--list
argument that lists the tests it contains - Test runners now support a
--exact
argument that makes the test filter match exactly, instead of matching only a substring of the test name - rustdoc supports a
--playground-url
flag - rustdoc provides more details about
#[should_panic]
errors
Misc
- The Rust build system is now written in Rust. The Makefiles may
continue to be used in this release by passing
--disable-rustbuild
to the configure script, but they will be deleted soon. Note that the new build system uses a different on-disk layout that will likely affect any scripts building Rust. - Rust supports i686-unknown-openbsd. Tier 3 support. No testing or releases.
- Rust supports the MSP430. Tier 3 support. No testing or releases.
- Rust supports the ARMv5TE architecture. Tier 3 support. No testing or releases.
Compatibility Notes
- A number of minor changes to name resolution have been activated.
They add up to more consistent semantics, allowing for future evolution of
Rust macros. Specified in RFC 1560, see its section on "changes" for
details of what is different. The breaking changes here have been transitioned
through the
legacy_imports
lint since 1.14, with no known regressions. - In this release, Cargo build scripts no longer have access to the
OUT_DIR
environment variable at build time viaenv!("OUT_DIR")
. They should instead check the variable at runtime withstd::env
. That the value was set at build time was a bug, and incorrect when cross-compiling. This change is known to cause breakage. - Higher-ranked lifetimes are no longer allowed to appear only in associated
types. The
hr_lifetime_in_assoc_type
lint has been a warning since 1.10 and is now an error by default. It will become a hard error in the near future. - The semantics relating modules to file system directories are changing in
minor ways. This is captured in the new
legacy_directory_ownership
lint, which is a warning in this release, and will become a hard error in the future. - Rust-ABI symbols are no longer exported from cdylibs
- Once
Peekable
peeks aNone
it will return thatNone
without re-querying the underlying iterator