Version 1.35.0 (2019-05-23)
Language
FnOnce,FnMut, and theFntraits are now implemented forBox<FnOnce>,Box<FnMut>, andBox<Fn>respectively.- You can now coerce closures into unsafe function pointers. e.g.
unsafe fn call_unsafe(func: unsafe fn()) { func() } pub fn main() { unsafe { call_unsafe(|| {}); } }
Compiler
- Added the
armv6-unknown-freebsd-gnueabihfandarmv7-unknown-freebsd-gnueabihftargets. - Added the
wasm32-unknown-wasitarget.
Libraries
Threadwill now show its ID inDebugoutput.StdinLock,StdoutLock, andStderrLocknow implementAsRawFd.alloc::Systemnow implementsDefault.- Expanded
Debugoutput ({:#?}) for structs now has a trailing comma on the last field. char::{ToLowercase, ToUppercase}now implementExactSizeIterator.- All
NonZeronumeric types now implementFromStr. - Removed the
Readtrait bounds on theBufReader::{get_ref, get_mut, into_inner}methods. - You can now call the
dbg!macro without any parameters to print the file and line where it is called. - In place ASCII case conversions are now up to 4× faster.
e.g.
str::make_ascii_lowercase hash_map::{OccupiedEntry, VacantEntry}now implementSyncandSend.
Stabilized APIs
f32::copysignf64::copysignRefCell::replace_withRefCell::map_splitptr::hashRange::containsRangeFrom::containsRangeTo::containsRangeInclusive::containsRangeToInclusive::containsOption::copied
Cargo
- You can now set
cargo:rustc-cdylib-link-argat build time to pass custom linker arguments when building acdylib. Its usage is highly platform specific.