1.20.0 #
- Released on: 31 August, 2017
- Branched from master on: 14 July, 2017
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-emscriptentarget. - 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-elftarget. - 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,Hashfor unsized tuples. - Impl
fmt::{Display, Debug}forRef,RefMut,MutexGuard,RwLockReadGuard,RwLockWriteGuard - Impl
CloneforDefaultHasher. - Impl
SyncforSyncSender. - Impl
FromStrforchar - 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}::Displaynow avoids allocations where possible
Stabilized APIs #
CStr::into_c_stringCString::as_c_strCString::into_boxed_c_strChain::get_mutChain::get_refChain::into_innerOption::get_or_insert_withOption::get_or_insertOsStr::into_os_stringOsString::into_boxed_os_strTake::get_mutTake::get_refUtf8Error::error_lenchar::EscapeDebugchar::escape_debugcompile_error!f32::from_bitsf32::to_bitsf64::from_bitsf64::to_bitsmem::ManuallyDropslice::sort_unstable_by_keyslice::sort_unstable_byslice::sort_unstablestr::from_boxed_utf8_uncheckedstr::as_bytes_mutstr::as_bytes_mutstr::from_utf8_mutstr::from_utf8_unchecked_mutstr::get_mutstr::get_unchecked_mutstr::get_uncheckedstr::getstr::into_boxed_bytes
Cargo #
- Cargo API token location moved from
~/.cargo/configto~/.cargo/credentials. - Cargo will now build
main.rsbinaries that are in sub-directories ofsrc/bin. ie. Havingsrc/bin/server/main.rsandsrc/bin/client/main.rsgeneratestarget/debug/serverandtarget/debug/client - You can now specify version of a binary when installed through
cargo installusing--vers. - Added
--no-fail-fastflag to cargo to run all benchmarks regardless of failure. - Changed the convention around which file is the crate root.