Rust 1.75.0
Released on December 28, 2023
What's Changed
- Stabilize
async fnand return-positionimpl Traitin traits. - Allow function pointer signatures containing
&mut Tinconstcontexts. - Match
usize/isizeexhaustively with half-open ranges. - Guarantee that
charhas the same size and alignment asu32. - Document that the null pointer has the 0 address.
- Allow partially moved values in
match. - Add notes about non-compliant FP behavior on 32bit x86 targets.
- Stabilize ratified RISC-V target features.
- Rework negative coherence to properly consider impls that only partly overlap.
- Bump
COINDUCTIVE_OVERLAP_IN_COHERENCEto deny, and warn in dependencies. - Consider alias bounds when computing liveness in NLL.
- Add the V (vector) extension to the
riscv64-linux-androidtarget spec. - Automatically enable cross-crate inlining for small functions
- Add several new tier 3 targets:
csky-unknown-linux-gnuabiv2hfi586-unknown-netbsdmipsel-unknown-netbsd
- Override
Waker::clone_fromto avoid cloningWakers unnecessarily. - Implement
BufReadforVecDeque. - Implement
FusedIteratorforDecodeUtf16when the inner iterator does. - Implement
Not, Bit{And,Or}{,Assign}for IP addresses. - Implement
DefaultforExitCode. - Guarantee representation of None in NPO
- Document when atomic loads are guaranteed read-only.
- Broaden the consequences of recursive TLS initialization.
- Windows: Support sub-millisecond sleep.
- Fix generic bound of
str::SplitInclusive'sDoubleEndedIteratorimpl - Fix exit status / wait status on non-Unix
cfg(unix)platforms. Atomic*::from_ptrFileTimesFileTimesExtFile::set_modifiedFile::set_timesIpAddr::to_canonicalIpv6Addr::to_canonicalOption::as_sliceOption::as_mut_slicepointer::byte_addpointer::byte_offsetpointer::byte_offset_frompointer::byte_subpointer::wrapping_byte_addpointer::wrapping_byte_offsetpointer::wrapping_byte_subIpv6Addr::to_ipv4_mappedMaybeUninit::assume_init_readMaybeUninit::zeroedmem::discriminantmem::zeroed
- Accept less invalid Rust in rustdoc.
- Document lack of object safety on affected traits.
- Hide
#[repr(transparent)]if it isn't part of the public ABI. - Show enum discriminant if it is a C-like variant.
- Optimize
librustc_driver.sowith BOLT. - Enable parallel rustc front end in dev and nightly builds.
- Distribute
rustc-codegen-craneliftas rustup component on the nightly channel.
Full Changelog
Language
--------
- Stabilize async fn and return-position impl Trait in traits.
- Allow function pointer signatures containing &mut T in const contexts.
- Match usize/isize exhaustively with half-open ranges.
- Guarantee that char has the same size and alignment as u32.
- Document that the null pointer has the 0 address.
- Allow partially moved values in match.
- Add notes about non-compliant FP behavior on 32bit x86 targets.
- Stabilize ratified RISC-V target features.
Compiler
--------
- Rework negative coherence to properly consider impls that only partly overlap.
- Bump COINDUCTIVE_OVERLAP_IN_COHERENCE to deny, and warn in dependencies.
- Consider alias bounds when computing liveness in NLL.
- Add the V (vector) extension to the riscv64-linux-android target spec.
- Automatically enable cross-crate inlining for small functions
- Add several new tier 3 targets:
- csky-unknown-linux-gnuabiv2hf
Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.
Libraries
---------
- Override Waker::clone_from to avoid cloning Wakers unnecessarily.
- Implement BufRead for VecDeque.
- Implement FusedIterator for DecodeUtf16 when the inner iterator does.
- Implement Not, Bit{And,Or}{,Assign} for IP addresses.
- Implement Default for ExitCode.
- Guarantee representation of None in NPO
- Document when atomic loads are guaranteed read-only.
- Broaden the consequences of recursive TLS initialization.
- Windows: Support sub-millisecond sleep.
- Fix generic bound of str::SplitInclusive's DoubleEndedIterator impl
- Fix exit status / wait status on non-Unix cfg(unix) platforms.
Stabilized APIs
---------------
- pointer::wrapping_byte_offset
These APIs are now stable in const contexts:
- MaybeUninit::assume_init_read
Cargo
-----
- Add new packages to [workspace.members] automatically.
- Allow version-less Cargo.toml manifests.
- Make browser links out of HTML file paths.
Rustdoc
-------
- Accept less invalid Rust in rustdoc.
- Document lack of object safety on affected traits.
- Hide #[repr(transparent)] if it isn't part of the public ABI.
- Show enum discriminant if it is a C-like variant.
Compatibility Notes
-------------------
- FreeBSD targets now require at least version 12.
- Formally demote tier 2 MIPS targets to tier 3.
- Make misalignment a hard error in const contexts.
- Fix detecting references to packed unsized fields.
- Remove support for compiler plugins.
Internal Changes
----------------
These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.
- Optimize librustc_driver.so with BOLT.
- Enable parallel rustc front end in dev and nightly builds.
- Distribute rustc-codegen-cranelift as rustup component on the nightly channel.