1.9.0 #
- Released on: 26 May, 2016
- Branched from master on: 8 April, 2016
Language #
- The #[deprecated]attribute when applied to an API will generate warnings when used. The warnings may be suppressed with#[allow(deprecated)]. RFC 1270.
- fnitem types are zero sized, and each- fnnames a unique type. This will break code that transmutes- fns, so calling- transmuteon a- fntype will generate a warning for a few cycles, then will be converted to an error.
- Field and method resolution understand visibility, so private fields and methods cannot prevent the proper use of public fields and methods.
- The parser considers unicode codepoints in the
PATTERN_WHITE_SPACEcategory to be whitespace.
Stabilized APIs #
- std::panic
- std::panic::catch_unwind(renamed from- recover)
- std::panic::resume_unwind(renamed from- propagate)
- std::panic::AssertUnwindSafe(renamed from- AssertRecoverSafe)
- std::panic::UnwindSafe(renamed from- RecoverSafe)
- str::is_char_boundary
- <*const T>::as_ref
- <*mut T>::as_ref
- <*mut T>::as_mut
- AsciiExt::make_ascii_uppercase
- AsciiExt::make_ascii_lowercase
- char::decode_utf16
- char::DecodeUtf16
- char::DecodeUtf16Error
- char::DecodeUtf16Error::unpaired_surrogate
- BTreeSet::take
- BTreeSet::replace
- BTreeSet::get
- HashSet::take
- HashSet::replace
- HashSet::get
- OsString::with_capacity
- OsString::clear
- OsString::capacity
- OsString::reserve
- OsString::reserve_exact
- OsStr::is_empty
- OsStr::len
- std::os::unix::thread
- RawPthread
- JoinHandleExt
- JoinHandleExt::as_pthread_t
- JoinHandleExt::into_pthread_t
- HashSet::hasher
- HashMap::hasher
- CommandExt::exec
- File::try_clone
- SocketAddr::set_ip
- SocketAddr::set_port
- SocketAddrV4::set_ip
- SocketAddrV4::set_port
- SocketAddrV6::set_ip
- SocketAddrV6::set_port
- SocketAddrV6::set_flowinfo
- SocketAddrV6::set_scope_id
- slice::copy_from_slice
- ptr::read_volatile
- ptr::write_volatile
- OpenOptions::create_new
- TcpStream::set_nodelay
- TcpStream::nodelay
- TcpStream::set_ttl
- TcpStream::ttl
- TcpStream::set_only_v6
- TcpStream::only_v6
- TcpStream::take_error
- TcpStream::set_nonblocking
- TcpListener::set_ttl
- TcpListener::ttl
- TcpListener::set_only_v6
- TcpListener::only_v6
- TcpListener::take_error
- TcpListener::set_nonblocking
- UdpSocket::set_broadcast
- UdpSocket::broadcast
- UdpSocket::set_multicast_loop_v4
- UdpSocket::multicast_loop_v4
- UdpSocket::set_multicast_ttl_v4
- UdpSocket::multicast_ttl_v4
- UdpSocket::set_multicast_loop_v6
- UdpSocket::multicast_loop_v6
- UdpSocket::set_multicast_ttl_v6
- UdpSocket::multicast_ttl_v6
- UdpSocket::set_ttl
- UdpSocket::ttl
- UdpSocket::set_only_v6
- UdpSocket::only_v6
- UdpSocket::join_multicast_v4
- UdpSocket::join_multicast_v6
- UdpSocket::leave_multicast_v4
- UdpSocket::leave_multicast_v6
- UdpSocket::take_error
- UdpSocket::connect
- UdpSocket::send
- UdpSocket::recv
- UdpSocket::set_nonblocking
Libraries #
- std::sync::Onceis poisoned if its initialization function fails.
- cell::Refand- cell::RefMutcan contain unsized types.
- Most types implement fmt::Debug.
- The default buffer size used by BufReaderandBufWriterwas reduced to 8K, from 64K. This is in line with the buffer size used by other languages.
- Instant,- SystemTimeand- Durationimplement- +=and- -=.- Durationadditionally implements- *=and- /=.
- Skipis a- DoubleEndedIterator.
- From<[u8; 4]>is implemented for- Ipv4Addr.
- Chainimplements- BufRead.
- HashMap,- HashSetand iterators are covariant.
Cargo #
- Cargo can now run concurrently.
- Top-level overrides allow specific revisions of crates to be overridden through the entire crate graph. This is intended to make upgrades easier for large projects, by allowing crates to be forked temporarily until they’ve been upgraded and republished.
- Cargo exports a CARGO_PKG_AUTHORSenvironment variable.
- Cargo will pass the contents of the RUSTFLAGSvariable torustcon the commandline.rustcarguments can also be specified in thebuild.rustflagsconfiguration key.
Performance #
- The time complexity of comparing variables for equivalence during type unification is reduced from O(n!) to O(n). This leads to major compilation time improvement in some scenarios.
- ToStringis specialized for- str, giving it the same performance as- to_owned.
- Spawning processes with Command::outputno longer creates extra threads.
- #[derive(PartialEq)]and- #[derive(PartialOrd)]emit less code for C-like enums.
Misc #
- Passing the --quietflag to a test runner will produce much-abbreviated output.
- The Rust Project now publishes std binaries for the
mips-unknown-linux-musl,mipsel-unknown-linux-musl, andi586-pc-windows-msvctargets.
Compatibility Notes #
- std::sync::Onceis poisoned if its initialization function fails.
- It is illegal to define methods with the same name in overlapping
inherent implblocks.
- fnitem types are zero sized, and each- fnnames a unique type. This will break code that transmutes- fns, so calling- transmuteon a- fntype will generate a warning for a few cycles, then will be converted to an error.
- Improvements to const evaluation may trigger new errors when integer literals are out of range.