1.26.0 #
- Released on: 10 May, 2018
 - Branched from master on: 23 March, 2018
 
Language #
- Closures now implement 
Copyand/orCloneif all captured variables implement either or both traits. - The inclusive range syntax e.g. 
for x in 0..=10is now stable. - The 
'_lifetime is now stable. The underscore lifetime can be used anywhere a lifetime can be elided. impl Traitis now stable allowing you to have abstract types in returns or in function parameters. E.g.fn foo() -> impl Iterator<Item=u8>orfn open(path: impl AsRef<Path>).- Pattern matching will now automatically apply dereferences.
 - 128-bit integers in the form of 
u128andi128are now stable. maincan now returnResult<(), E: Debug>in addition to().- A lot of operations are now available in a const context. E.g. You can now index into constant arrays, reference and dereference into constants, and use tuple struct constructors.
 - Fixed entry slice patterns are now stable. E.g.
let points = [1, 2, 3, 4]; match points { [1, 2, 3, 4] => println!("All points were sequential."), _ => println!("Not all points were sequential."), } 
Compiler #
- LLD is now used as the default linker for 
wasm32-unknown-unknown. - Fixed exponential projection complexity on nested types. This can provide up to a ~12% reduction in compile times for certain crates.
 - Added the 
--remap-path-prefixoption to rustc. Allowing you to remap path prefixes outputted by the compiler. - Added 
powerpc-unknown-netbsdtarget. 
Libraries #
- Implemented 
From<u16> for usize&From<{u8, i16}> for isize. - Added hexadecimal formatting for integers with fmt::Debug
e.g. 
assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]") - Implemented 
Default, Hashforcmp::Reverse. - Optimized 
str::repeatbeing 8x faster in large cases. ascii::escape_defaultis now available in libcore.- Trailing commas are now supported in std and core macros.
 - Implemented 
Copy, Cloneforcmp::Reverse - Implemented 
Cloneforchar::{ToLowercase, ToUppercase}. 
Stabilized APIs #
*const T::add*const T::copy_to_nonoverlapping*const T::copy_to*const T::read_unaligned*const T::read_volatile*const T::read*const T::sub*const T::wrapping_add*const T::wrapping_sub*mut T::add*mut T::copy_to_nonoverlapping*mut T::copy_to*mut T::read_unaligned*mut T::read_volatile*mut T::read*mut T::replace*mut T::sub*mut T::swap*mut T::wrapping_add*mut T::wrapping_sub*mut T::write_bytes*mut T::write_unaligned*mut T::write_volatile*mut T::writeBox::leakFromUtf8Error::as_bytesLocalKey::try_withOption::clonedbtree_map::Entry::and_modifyfs::read_to_stringfs::readfs::writehash_map::Entry::and_modifyiter::FusedIteratorops::RangeInclusiveops::RangeToInclusiveprocess::idslice::rotate_leftslice::rotate_rightString::retain
Cargo #
- Cargo will now output path to custom commands when 
-vis passed with--list - The Cargo binary version is now the same as the Rust version
 
Misc #
Compatibility Notes #
- aliasing a 
Fntrait asdynno longer works. E.g. the following syntax is now invalid.use std::ops::Fn as dyn; fn g(_: Box<dyn(std::fmt::Debug)>) {} - The result of dereferences are no longer promoted to 
'static. e.g.fn main() { const PAIR: &(i32, i32) = &(0, 1); let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work } - Deprecate 
AsciiExttrait in favor of inherent methods. ".e0"will now no longer parse as0.0and will instead cause an error.- Removed hoedown from rustdoc.
 - Bounds on higher-kinded lifetimes a hard error.