← Back to all releases

Rust 1.38.0

Released on September 26, 2019

What's Changed

  • [The #[global_allocator] attribute can now be used in submodules.][62735]
  • [The #[deprecated] attribute can now be used on macros.][62042]

  • [Added pipelined compilation support to rustc.][62766] This will
  • [Added tier 3\* support for the aarch64-uwp-windows-msvc, i686-uwp-windows-gnu,
  • [Added tier 3 support for the armv7-unknown-linux-gnueabi and
  • [Added tier 3 support for the hexagon-unknown-linux-musl target.][62814]
  • [Added tier 3 support for the riscv32i-unknown-none-elf target.][62784]
  • [Upgraded to LLVM 9.][62592]

  • [ascii::EscapeDefault now implements Clone and Display.][63421]
  • [Derive macros for prelude traits (e.g. Clone, Debug, Hash) are now
  • [str::Chars now implements Debug.][63000]
  • [slice::{concat, connect, join} now accepts &[T] in addition to &T.][62528]
  • [const T and mut T now implement marker::Unpin.][62583]
  • [Arc<[T]> and Rc<[T]> now implement FromIterator.][61953]
  • [Added euclidean remainder and division operations (div_euclid,
  • [thread::AccessError now implements Clone, Copy, Eq, Error, and
  • [iter::{StepBy, Peekable, Take} now implement DoubleEndedIterator.][61457]
  • [<*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]

  • [Added pipelined compilation support to cargo.][cargo/7143]
  • [You can now pass the --features option multiple times to enable

  • The [x86_64-unknown-uefi platform can not be built][62785] with rustc
  • The [armv7-unknown-linux-gnueabihf platform is known to have

  • [Documentation on pub use statements is prepended to the documentation of the re-exported item][63048]
  • [rustc will now warn about some incorrect uses of
Full Changelog

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, and x86_64-uwp-windows-msvc targets.][60260]

- [Added tier 3 support for the armv7-unknown-linux-gnueabi and

armv7-unknown-linux-musleabi targets.][63107]

- [Added tier 3 support for the hexagon-unknown-linux-musl target.][62814]

- [Added tier 3 support for the riscv32i-unknown-none-elf target.][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::EscapeDefault now implements Clone and Display.][63421]

- [Derive macros for prelude traits (e.g. Clone, Debug, Hash) are now

available at the same path as the trait.][63056] (e.g. The Clone derive macro

is available at std::clone::Clone). This also makes all built-in macros

available in std/core root. e.g. std::include_bytes!.

- [str::Chars now implements Debug.][63000]

- [slice::{concat, connect, join} now accepts &[T] in addition to &T.][62528]

- [const T and mut T now implement marker::Unpin.][62583]

- [Arc<[T]> and Rc<[T]> now implement FromIterator.][61953]

- [Added euclidean remainder and division operations (div_euclid,

rem_euclid) to all numeric primitives.][61884] Additionally checked, overflowing, and wrapping versions are available for all

integer primitives.

- [thread::AccessError now implements Clone, Copy, Eq, Error, and

PartialEq.][61491]

- [iter::{StepBy, Peekable, Take} now implement DoubleEndedIterator.][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 --features option multiple times to enable

multiple features.][cargo/7084]

Rustdoc

-------

- [Documentation on pub use statements is prepended to the documentation of the re-exported item][63048]

Misc

----

- [rustc will now warn about some incorrect uses of

mem::{uninitialized, zeroed} that are known to cause undefined behaviour.][63346]

Compatibility Notes

-------------------

- The [x86_64-unknown-uefi platform can not be built][62785] with rustc

1.38.0.

- The [armv7-unknown-linux-gnueabihf platform is known to have

issues][62896] with certain crates such as libc.

[60260]: https://github.com/rust-lang/rust/pull/60260/

[61457]: https://github.com/rust-lang/rust/pull/61457/

[61491]: https://github.com/rust-lang/rust/pull/61491/

[61884]: https://github.com/rust-lang/rust/pull/61884/

[61953]: https://github.com/rust-lang/rust/pull/61953/

[62042]: https://github.com/rust-lang/rust/pull/62042/

[62528]: https://github.com/rust-lang/rust/pull/62528/

[62583]: https://github.com/rust-lang/rust/pull/62583/

[62735]: https://github.com/rust-lang/rust/pull/62735/

[62766]: https://github.com/rust-lang/rust/pull/62766/

[62784]: https://github.com/rust-lang/rust/pull/62784/

[62592]: https://github.com/rust-lang/rust/pull/62592/

[62785]: https://github.com/rust-lang/rust/issues/62785/

[62814]: https://github.com/rust-lang/rust/pull/62814/

[62896]: https://github.com/rust-lang/rust/issues/62896/

[63000]: https://github.com/rust-lang/rust/pull/63000/

[63056]: https://github.com/rust-lang/rust/pull/63056/

[63107]: https://github.com/rust-lang/rust/pull/63107/

[63346]: https://github.com/rust-lang/rust/pull/63346/

[63421]: https://github.com/rust-lang/rust/pull/63421/

[cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/

[cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/

[63048]: https://github.com/rust-lang/rust/pull/63048

[<*const T>::cast]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast

[<*mut T>::cast]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast

[Duration::as_secs_f32]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32

[Duration::as_secs_f64]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64

[Duration::div_f32]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32

[Duration::div_f64]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64

[Duration::from_secs_f32]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32

[Duration::from_secs_f64]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64

[Duration::mul_f32]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32

[Duration::mul_f64]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64

[any::type_name]: https://doc.rust-lang.org/std/any/fn.type_name.html

[platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html

[pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199