Rust versions / 1.35
Rust release · May 23, 2019
Rust 1.35: what's new, what was stabilized
Short answerRust 1.35 was released on May 23, 2019: 11 newly stable APIs (f32::copysign, f64::copysign, RefCell::replace_with, RefCell::map_split, ...).
← Rust 1.34All versionsRust 1.36 →
11 APIs stabilized
f32::copysign, f64::copysign, RefCell::replace_with, RefCell::map_split, ptr::hash, Range::contains, RangeFrom::contains, RangeTo::contains, RangeInclusive::contains, RangeToInclusive::contains, Option::copied
Can it break my build?
No compatibility notes were listed for this release.
Use it
rustup update stable # get the newest release
rustup install 1.35 # or exactly this one
rustup override set 1.35 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.35" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Language
- [
FnOnce,FnMut, and theFntraits are now implemented forBox<FnOnce>,Box<FnMut>, andBox<Fn>respectively.][59500] - [You can now coerce closures into unsafe function pointers.][59580] e.g. ```rust unsafe fn call_unsafe(func: unsafe fn()) { func() }
pub fn main() { unsafe { call_unsafe(|| {}); } } ```
Compiler
- [Added the
armv6-unknown-freebsd-gnueabihfandarmv7-unknown-freebsd-gnueabihftargets.][58080] - [Added the
wasm32-unknown-wasitarget.][59464]
Libraries
- [
Threadwill now show its ID inDebugoutput.][59460] - [
StdinLock,StdoutLock, andStderrLocknow implementAsRawFd.][59512] - [
alloc::Systemnow implementsDefault.][59451] - [Expanded
Debugoutput ({:#?}) for structs now has a trailing comma on the last field.][59076] - [
char::{ToLowercase, ToUppercase}now implementExactSizeIterator.][58778] - [All
NonZeronumeric types now implementFromStr.][58717] - [Removed the
Readtrait bounds on theBufReader::{get_ref, get_mut, into_inner}methods.][58423] - [You can now call the
dbg!macro without any parameters to print the file and line where it is called.][57847] - [In place ASCII case conversions are now up to 4× faster.][59283] e.g.
str::make_ascii_lowercase - [
hash_map::{OccupiedEntry, VacantEntry}now implementSyncandSend.][58369]
Stabilized APIs
- [
f32::copysign] - [
f64::copysign] - [
RefCell::replace_with] - [
RefCell::map_split] - [
ptr::hash] - [
Range::contains] - [
RangeFrom::contains] - [
RangeTo::contains] - [
RangeInclusive::contains] - [
RangeToInclusive::contains] - [
Option::copied]
Cargo
- [You can now set
cargo:rustc-cdylib-link-argat build time to pass custom linker arguments when building acdylib.][cargo/6298] Its usage is highly platform specific.
Misc
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.36Released Jul 4, 2019.Read it next →Also worth your time
Did this answer your question?