Rust versions / 1.38
Rust release · Sep 26, 2019
Rust 1.38: what's new, what was stabilized
Short answerRust 1.38 was released on Sep 26, 2019: 11 newly stable APIs (<*const T>::cast, <*mut T>::cast, Duration::as_secs_f32, Duration::as_secs_f64, ...); 2 compatibility notes that can affect existing code.
← Rust 1.37All versionsRust 1.39 →
11 APIs stabilized
<*const T>::cast, <*mut T>::cast, Duration::as_secs_f32, Duration::as_secs_f64, Duration::div_f32, Duration::div_f64, Duration::from_secs_f32, Duration::from_secs_f64, Duration::mul_f32, Duration::mul_f64, any::type_name
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:
- The [
x86_64-unknown-uefiplatform can not be built][62785] with rustc - The [
armv7-unknown-linux-gnueabihfplatform is known to have
Use it
rustup update stable # get the newest release
rustup install 1.38 # or exactly this one
rustup override set 1.38 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.38" 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
- [The
#[global_allocator]attribute can now be used in submodules.][62735] - [The
#[deprecated]attribute can now be used on macros.][62042]
Compiler
- [Added pipelined compilation support to
rustc.][62766] This will improve compilation times in some cases. For further information please refer to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread. - [Added tier 3\* support for the
aarch64-uwp-windows-msvc,i686-uwp-windows-gnu,i686-uwp-windows-msvc,x86_64-uwp-windows-gnu, andx86_64-uwp-windows-msvctargets.][60260] - [Added tier 3 support for the
armv7-unknown-linux-gnueabiandarmv7-unknown-linux-musleabitargets.][63107] - [Added tier 3 support for the
hexagon-unknown-linux-musltarget.][62814] - [Added tier 3 support for the
riscv32i-unknown-none-elftarget.][62784] - [Upgraded to LLVM 9.][62592]
\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
Libraries
- [
ascii::EscapeDefaultnow implementsCloneandDisplay.][63421] - [Derive macros for prelude traits (e.g.
Clone,Debug,Hash) are now available at the same path as the trait.][63056] (e.g. TheClonederive macro is available atstd::clone::Clone). This also makes all built-in macros available instd/coreroot. e.g.std::include_bytes!. - [
str::Charsnow implementsDebug.][63000] - [
slice::{concat, connect, join}now accepts&[T]in addition to&T.][62528] - [
*const Tand*mut Tnow implementmarker::Unpin.][62583] - [
Arc<[T]>andRc<[T]>now implementFromIterator<T>.][61953] - [Added euclidean remainder and division operations (
div_euclid,rem_euclid) to all numeric primitives.][61884] Additionallychecked,overflowing, andwrappingversions are available for all integer primitives. - [
thread::AccessErrornow implementsClone,Copy,Eq,Error, andPartialEq.][61491] - [
iter::{StepBy, Peekable, Take}now implementDoubleEndedIterator.][61457]
Stabilized APIs
- [
<*const T>::cast] - [
<*mut T>::cast] - [
Duration::as_secs_f32] - [
Duration::as_secs_f64] - [
Duration::div_f32] - [
Duration::div_f64] - [
Duration::from_secs_f32] - [
Duration::from_secs_f64] - [
Duration::mul_f32] - [
Duration::mul_f64] - [
any::type_name]
Cargo
- [Added pipelined compilation support to
cargo.][cargo/7143] - [You can now pass the
--featuresoption multiple times to enable multiple features.][cargo/7084]
Rustdoc
- [Documentation on
pub usestatements is prepended to the documentation of the re-exported item][63048]
Misc
- [
rustcwill now warn about some incorrect uses ofmem::{uninitialized, zeroed}that are known to cause undefined behaviour.][63346]
Compatibility Notes
- The
x86_64-unknown-uefiplatform can not be built with rustc 1.38.0. - The
armv7-unknown-linux-gnueabihfplatform is known to have issues with certain crates such as libc.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.39Released Nov 7, 2019.Read it next →Also worth your time
Did this answer your question?