Version 1.36.0 (2019-07-04)
Language
- Non-Lexical Lifetimes are now enabled on the 2015 edition.
- The order of traits in trait objects no longer affects the semantics of that
object. e.g.
dyn Send + fmt::Debugis now equivalent todyn fmt::Debug + Send, where this was previously not the case.
Libraries
HashMap's implementation has been replaced withhashbrown::HashMapimplementation.TryFromSliceErrornow implementsFrom<Infallible>.mem::needs_dropis now available as a const fn.alloc::Layout::from_size_align_uncheckedis now available as a const fn.Stringnow implementsBorrowMut<str>.io::Cursornow implementsDefault.- Both
NonNull::{dangling, cast}are now const fns. - The
alloccrate is now stable.allocallows you to use a subset ofstd(e.g.Vec,Box,Arc) in#![no_std]environments if the environment has access to heap memory allocation. Stringnow implementsFrom<&String>.- You can now pass multiple arguments to the
dbg!macro.dbg!will return a tuple of each argument when there is multiple arguments. Result::{is_err, is_ok}are now#[must_use]and will produce a warning if not used.
Stabilized APIs
VecDeque::rotate_leftVecDeque::rotate_rightIterator::copiedio::IoSliceio::IoSliceMutRead::read_vectoredWrite::write_vectoredstr::as_mut_ptrmem::MaybeUninitpointer::align_offsetfuture::Futuretask::Contexttask::RawWakertask::RawWakerVTabletask::Wakertask::Poll
Cargo
- Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.
- You can now pass the
--offlineflag to run cargo without accessing the network.
You can find further change's in Cargo's 1.36.0 release notes.
Clippy
There have been numerous additions and fixes to clippy, see Clippy's 1.36.0 release notes for more details.
Misc
Compatibility Notes
- With the stabilisation of
mem::MaybeUninit,mem::uninitializeduse is no longer recommended, and will be deprecated in 1.39.0.