Rust 1.10.0
Released on July 7, 2016
What's Changed
Copytypes are required to have a trivial implementation ofClone.- Single-variant enums support the
#[repr(..)]attribute. - Fix
#[derive(RustcEncodable)]in the presence of otherencodemethods. - [
panic!can be converted to a runtime abort with the - Add a new crate type, 'cdylib'.
os::windows::fs::OpenOptionsExt::access_modeos::windows::fs::OpenOptionsExt::share_modeos::windows::fs::OpenOptionsExt::custom_flagsos::windows::fs::OpenOptionsExt::attributesos::windows::fs::OpenOptionsExt::security_qos_flagsos::unix::fs::OpenOptionsExt::custom_flagssync::Weak::newDefault for sync::Weakpanic::set_hookpanic::take_hookpanic::PanicInfopanic::PanicInfo::payloadpanic::PanicInfo::locationpanic::Locationpanic::Location::filepanic::Location::lineffi::CStr::from_bytes_with_nulffi::CStr::from_bytes_with_nul_uncheckedffi::FromBytesWithNulErrorfs::Metadata::modifiedfs::Metadata::accessedfs::Metadata::createdsync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchangesync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weakcollections::{btree,hash}_map::{Occupied,Vacant,}Entry::keyos::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}SocketAddr::is_unnamedSocketAddr::as_pathnameUnixStream::connectUnixStream::pairUnixStream::try_cloneUnixStream::local_addrUnixStream::peer_addrUnixStream::set_read_timeoutUnixStream::set_write_timeoutUnixStream::read_timeoutUnixStream::write_timeoutUnixStream::set_nonblockingUnixStream::take_errorUnixStream::shutdown- Read/Write/RawFd impls for
UnixStream UnixListener::bindUnixListener::acceptUnixListener::try_cloneUnixListener::local_addrUnixListener::set_nonblockingUnixListener::take_errorUnixListener::incoming- RawFd impls for
UnixListener UnixDatagram::bindUnixDatagram::unboundUnixDatagram::pairUnixDatagram::connectUnixDatagram::try_cloneUnixDatagram::local_addrUnixDatagram::peer_addrUnixDatagram::recv_fromUnixDatagram::recvUnixDatagram::send_toUnixDatagram::sendUnixDatagram::set_read_timeoutUnixDatagram::set_write_timeoutUnixDatagram::read_timeoutUnixDatagram::write_timeoutUnixDatagram::set_nonblockingUnixDatagram::take_errorUnixDatagram::shutdown- RawFd impls for
UnixDatagram {BTree,Hash}Map::values_mut<[_]>::binary_search_by_key- The
abs_submethod of floats is deprecated. - Add implementation of Ord for Cell
and RefCell .where T: Ord - [On Linux, if
HashMaps can't be initialized withgetrandomthey - Implemented negation for wrapping numerals.
- Implement
Cloneforbinary_heap::IntoIter. - Implement
DisplayandHashforstd::num::Wrapping. - Add
Defaultimplementation for&CStr,CString. - Implement
Fromand> Intofor> VecDeque. - [Implement
DefaultforUnsafeCell,fmt::Error,Condvar,
- Cargo.toml supports the
profile.*.panicoption. - Don't throw away errors with
-parguments. - Report status to stderr instead of stdout.
- [Build scripts are passed a
CARGO_MANIFEST_LINKSenvironment - Ban keywords from crate names.
- Canonicalize
CARGO_HOMEon Windows. - Retry network requests.
- Don't print extra error info for failing subcommands.
- Add
--forceflag tocargo install. - Don't use
flockon NFS mounts. - Prefer building
cargo installartifacts in temporary directories. - Add
cargo test --doc. - Add
cargo --explain. - Don't print warnings when
-qis passed. - Add
cargo doc --liband--bin. - Don't require build script output to be UTF-8.
- Correctly attempt multiple git usernames.
- [rustc memory usage was reduced by refactoring the context used for
- [Speed up creation of
HashMaps by caching the random keys used - The
findimplementation forChainiterators is 2x faster. - Trait selection optimizations speed up type checking by 15%.
- Efficient trie lookup for boolean Unicode properties.
- Special case
#[derive(Copy, Clone)]to avoid bloat.
AtomicBoolis now bool-sized, not word-sized.- [
target_envfor Linux ARM targets is justgnu, not - Consistently panic on overflow in
Duration::new. - Change
String::truncateto panic less. - Add
:blockto the follow set for:tyand:path. - Fix macro hygiene bug.
- [Feature-gated attributes on macro-generated macro invocations are
- Suppress fallback and ambiguity errors during type inference.
- Many incremental improvements to documentation and rustdoc.
- rustdoc: List blanket trait impls.
- rustdoc: Clean up ABI rendering.
- Indexing with the wrong type produces a more informative error.
- Improve diagnostics for constants being used in irrefutable patterns.
- When many method candidates are in scope limit the suggestions to 10.
- Remove confusing suggestion when calling a
fntype. - Do not suggest changing
&mut selfto&mut mut self. - Update i686-linux-android features to match Android ABI.
- Update aarch64-linux-android features to match Android ABI.
- [
stdno longer prints backtraces on platforms where the running - This release includes std binaries for the i586-unknown-linux-gnu,
- [The
rust-gdbandrust-lldbscripts are distributed on all - [On Unix the runtime aborts by calling
libc::abortinstead of - [Rust is now bootstrapped from the previous release of Rust,
Full Changelog
Language
--------
* Copy types are required to have a trivial implementation of Clone.
* Single-variant enums support the #[repr(..)] attribute.
* Fix #[derive(RustcEncodable)] in the presence of other encode methods.
* panic! can be converted to a runtime abort with the
-C panic=abort flag.
RFC 1513.
* Add a new crate type, 'cdylib'.
cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
RFC 1510.Note that Cargo does not yet directly support cdylibs.
Stabilized APIs
---------------
* os::windows::fs::OpenOptionsExt::access_mode
* os::windows::fs::OpenOptionsExt::share_mode
* os::windows::fs::OpenOptionsExt::custom_flags
* os::windows::fs::OpenOptionsExt::attributes
* os::windows::fs::OpenOptionsExt::security_qos_flags
* os::unix::fs::OpenOptionsExt::custom_flags
* Default for sync::Weak
* ffi::CStr::from_bytes_with_nul
* ffi::CStr::from_bytes_with_nul_unchecked
* sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange
* sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak
* collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key
* os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}
* UnixStream::set_read_timeout
* UnixStream::set_write_timeout
* Read/Write/RawFd impls for UnixStream
* UnixListener::set_nonblocking
* RawFd impls for UnixListener
* UnixDatagram::set_read_timeout
* UnixDatagram::set_write_timeout
* UnixDatagram::set_nonblocking
* RawFd impls for UnixDatagram
* {BTree,Hash}Map::values_mut
Libraries
---------
* The abs_sub method of floats is deprecated.
The semantics of this minor method are subtle and probably not what
most people want.
* Add implementation of Ord for Cell
* On Linux, if HashMaps can't be initialized with getrandom they
will fall back to /dev/urandom temporarily to avoid blocking
during early boot.
* Implemented negation for wrapping numerals.
* Implement Clone for binary_heap::IntoIter.
* Implement Display and Hash for std::num::Wrapping.
* Add Default implementation for &CStr, CString.
* Implement From and Into for VecDeque.
* Implement Default for UnsafeCell, fmt::Error, Condvar,
Mutex, RwLock.
Cargo
-----
Cargo.toml supports theprofile..panic option.
This controls the runtime behavior of the panic! macro
and can be either "unwind" (the default), or "abort".
RFC 1513.* Don't throw away errors with -p arguments.
* Report status to stderr instead of stdout.
* Build scripts are passed a CARGO_MANIFEST_LINKS environment
variable that corresponds to the links field of the manifest.
* Ban keywords from crate names.
* Canonicalize CARGO_HOME on Windows.
By default they are retried twice, which can be customized with the
net.retry value in .cargo/config.
* Don't print extra error info for failing subcommands.
* Add --force flag to cargo install.
* Don't use flock on NFS mounts.
* Prefer building cargo install artifacts in temporary directories.
Makes it possible to install multiple crates in parallel.
* Don't print warnings when -q is passed.
* Add cargo doc --lib and --bin.
* Don't require build script output to be UTF-8.
* Correctly attempt multiple git usernames.
Performance
-----------
* rustc memory usage was reduced by refactoring the context used for
type checking.
* Speed up creation of HashMaps by caching the random keys used
to initialize the hash state.
* The find implementation for Chain iterators is 2x faster.
* Trait selection optimizations speed up type checking by 15%.
* Efficient trie lookup for boolean Unicode properties.
10x faster than the previous lookup tables.
* Special case #[derive(Copy, Clone)] to avoid bloat.
Usability
---------
* Many incremental improvements to documentation and rustdoc.
* rustdoc: List blanket trait impls.
* rustdoc: Clean up ABI rendering.
* Indexing with the wrong type produces a more informative error.
* Improve diagnostics for constants being used in irrefutable patterns.
* When many method candidates are in scope limit the suggestions to 10.
* Remove confusing suggestion when calling a fn type.
* Do not suggest changing &mut self to &mut mut self.
Misc
----
* Update i686-linux-android features to match Android ABI.
* Update aarch64-linux-android features to match Android ABI.
* std no longer prints backtraces on platforms where the running
module must be loaded with env::current_exe, which can't be relied
on.
* This release includes std binaries for the i586-unknown-linux-gnu,
i686-unknown-linux-musl, and armv7-linux-androideabi targets. The
i586 target is for old x86 hardware without SSE2, and the armv7
target is for Android running on modern ARM architectures.
* The rust-gdb and rust-lldb scripts are distributed on all
Unix platforms.
* On Unix the runtime aborts by calling libc::abort instead of
generating an illegal instruction.
* Rust is now bootstrapped from the previous release of Rust,
instead of a snapshot from an arbitrary commit.
Compatibility Notes
-------------------
* AtomicBool is now bool-sized, not word-sized.
* target_env for Linux ARM targets is just gnu, not
gnueabihf, gnueabi, etc.
* Consistently panic on overflow in Duration::new.
* Change String::truncate to panic less.
* Add :block to the follow set for :ty and :path.
Affects how macros are parsed.
* Feature-gated attributes on macro-generated macro invocations are
now rejected.
* Suppress fallback and ambiguity errors during type inference.
This caused some minor changes to type inference.