Rust versions / 1.29
Rust release · Sep 13, 2018
Rust 1.29: what's new, what was stabilized
Short answerRust 1.29 was released on Sep 13, 2018: 3 newly stable APIs (Arc::downcast, Iterator::flatten, Rc::downcast); 4 compatibility notes that can affect existing code. Point releases: 1.29.1 (Sep 25, 2018), 1.29.2 (Oct 11, 2018).
← Rust 1.28All versionsRust 1.30 →
3 APIs stabilized
Arc::downcast, Iterator::flatten, Rc::downcast
Can it break my build?
The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:
- [
str::{slice_unchecked, slice_unchecked_mut}are now deprecated.][51807] - [
std::env::home_diris now deprecated for its unintuitive behavior.][51656] - [
rustcwill no longer silently ignore invalid data in target spec.][52330] - [
cfgattributes and--cfgcommand line flags are now more
Use it
rustup update stable # get the newest release
rustup install 1.29 # or exactly this one
rustup override set 1.29 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.29" 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
Compiler
- [Bumped minimum LLVM version to 5.0.][51899]
- [Added
powerpc64le-unknown-linux-musltarget.][51619] - [Added
aarch64-unknown-hermitandx86_64-unknown-hermittargets.][52861] - [Upgraded to LLVM 7.][51966]
Libraries
- [
Once::call_onceno longer requiresOnceto be'static.][52239] - [
BuildHasherDefaultnow implementsPartialEqandEq.][52402] - [
Box<CStr>,Box<OsStr>, andBox<Path>now implementClone.][51912] - [Implemented
PartialEq<&str>forOsStringandPartialEq<OsString>for&str.][51178] - [
Cell<T>now allowsTto be unsized.][50494] - [
SocketAddris now stable on Redox.][52656]
Stabilized APIs
- [
Arc::downcast] - [
Iterator::flatten] - [
Rc::downcast]
Cargo
- [Cargo can silently fix some bad lockfiles.][cargo/5831] You can use
--lockedto disable this behavior. - [
cargo-installwill now allow you to cross compile an install using--target.][cargo/5614] - [Added the
cargo-fixsubcommand to automatically move project code from 2015 edition to 2018.][cargo/5723] - [
cargo doccan now optionally document private types using the--document-private-itemsflag.][cargo/5543]
Misc
- [
rustdocnow has the--cap-lintsoption which demotes all lints above the specified level to that level.][52354] For example--cap-lints warnwill demotedenyandforbidlints towarn. - [
rustcandrustdocwill now have the exit code of1if compilation fails and101if there is a panic.][52197] - [A preview of clippy has been made available through rustup.][51122] You can install the preview with
rustup component add clippy-preview.
Compatibility Notes
str::{slice_unchecked, slice_unchecked_mut}are now deprecated. Usestr::get_unchecked(begin..end)instead.std::env::home_diris now deprecated for its unintuitive behavior. Consider using thehome_dirfunction from https://crates.io/crates/dirs instead.rustcwill no longer silently ignore invalid data in target spec.cfgattributes and--cfgcommand line flags are now more strictly validated.
1.29.1 (Sep 25, 2018)
Security Notes --------------
- The standard library's
str::repeatfunction contained an out of bounds write caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens.
Thank you to Scott McMurray for responsibly disclosing this vulnerability to us.
1.29.2 (Oct 11, 2018)
- Workaround for an aliasing-related LLVM bug, which caused miscompilation.
- The
rls-previewcomponent on the windows-gnu targets has been restored.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.30Released Oct 25, 2018.Read it next →Also worth your time
Did this answer your question?