Version 1.34.2 (2019-05-14)
Version 1.34.1 (2019-04-25)
- Fix false positives for the
redundant_closureClippy lint - Fix false positives for the
missing_const_for_fnClippy lint - Fix Clippy panic when checking some macros
Version 1.34.0 (2019-04-11)
Language
- You can now use
#[deprecated = "reason"]as a shorthand for#[deprecated(note = "reason")]. This was previously allowed by mistake but had no effect. - You can now accept token streams in
#[attr()],#[attr[]], and#[attr{}]procedural macros. - You can now write
extern crate self as foo;to import your crate's root into the extern prelude.
Compiler
- You can now target
riscv64imac-unknown-none-elfandriscv64gc-unknown-none-elf. - You can now enable linker plugin LTO optimisations with
-C linker-plugin-lto. This allows rustc to compile your Rust code into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI boundaries. - You can now target
powerpc64-unknown-freebsd.
Libraries
- The trait bounds have been removed on some of
HashMap<K, V, S>'s andHashSet<T, S>'s basic methods. Most notably you no longer require theHashtrait to create an iterator. - The
Ordtrait bounds have been removed on some ofBinaryHeap<T>'s basic methods. Most notably you no longer require theOrdtrait to create an iterator. - The methods
overflowing_negandwrapping_negare nowconstfunctions for all numeric types. - Indexing a
stris now generic over all types that implementSliceIndex<str>. str::trim,str::trim_matches,str::trim_{start, end}, andstr::trim_{start, end}_matchesare now#[must_use]and will produce a warning if their returning type is unused.- The methods
checked_pow,saturating_pow,wrapping_pow, andoverflowing_poware now available for all numeric types. These are equivalent to methods such aswrapping_addfor thepowoperation.
Stabilized APIs
std & core
Any::type_idError::type_idatomic::AtomicI16atomic::AtomicI32atomic::AtomicI64atomic::AtomicI8atomic::AtomicU16atomic::AtomicU32atomic::AtomicU64atomic::AtomicU8convert::Infallibleconvert::TryFromconvert::TryIntoiter::from_fniter::successorsnum::NonZeroI128num::NonZeroI16num::NonZeroI32num::NonZeroI64num::NonZeroI8num::NonZeroIsizeslice::sort_by_cached_keystr::escape_debugstr::escape_defaultstr::escape_unicodestr::split_ascii_whitespace
std
Cargo
Misc
Compatibility Notes
Command::before_execis being replaced by the unsafe methodCommand::pre_execand will be deprecated with Rust 1.37.0.- Use of
ATOMIC_{BOOL, ISIZE, USIZE}_INITis now deprecated as you can now useconstfunctions instaticvariables.