Version 1.20.0 (2017-08-31)
Language
Compiler
- Struct fields are now properly coerced to the expected field type.
- Enabled wasm LLVM backend WASM can now be built with the
wasm32-experimental-emscripten
target. - Changed some of the error messages to be more helpful.
- Add support for RELRO(RELocation Read-Only) for platforms that support it.
- rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
- Expansion in rustc has been sped up 29x.
- added
msp430-none-elf
target. - rustc will now suggest one-argument enum variant to fix type mismatch when applicable
- Fixes backtraces on Redox
- rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
- Relaxed Debug constraints on
{HashMap,BTreeMap}::{Keys,Values}
. - Impl
PartialEq
,Eq
,PartialOrd
,Ord
,Debug
,Hash
for unsized tuples. - Impl
fmt::{Display, Debug}
forRef
,RefMut
,MutexGuard
,RwLockReadGuard
,RwLockWriteGuard
- Impl
Clone
forDefaultHasher
. - Impl
Sync
forSyncSender
. - Impl
FromStr
forchar
- Fixed how
{f32, f64}::{is_sign_negative, is_sign_positive}
handles NaN. - allow messages in the
unimplemented!()
macro. ie.unimplemented!("Waiting for 1.21 to be stable")
pub(restricted)
is now supported in thethread_local!
macro.- Upgrade to Unicode 10.0.0
- Reimplemented
{f32, f64}::{min, max}
in Rust instead of using CMath. - Skip the main thread's manual stack guard on Linux
- Iterator::nth for
ops::{Range, RangeFrom}
is now done in O(1) time #[repr(align(N))]
attribute max number is now 2^31 - 1. This was previously 2^15.{OsStr, Path}::Display
now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
- Cargo API token location moved from
~/.cargo/config
to~/.cargo/credentials
. - Cargo will now build
main.rs
binaries that are in sub-directories ofsrc/bin
. ie. Havingsrc/bin/server/main.rs
andsrc/bin/client/main.rs
generatestarget/debug/server
andtarget/debug/client
- You can now specify version of a binary when installed through
cargo install
using--vers
. - Added
--no-fail-fast
flag to cargo to run all benchmarks regardless of failure. - Changed the convention around which file is the crate root.