Rust 1.69.0
Released on April 20, 2023
What's Changed
- Deriving built-in traits on packed structs works with
Copyfields. - Stabilize the
cmpxchg16btarget feature on x86 and x86_64. - Improve analysis of trait bounds for associated types.
- Allow associated types to be used as union fields.
- Allow
Self: Autotraitbounds on dyn-safe trait methods. - Treat
stras containing[u8]for auto trait purposes.
- Implement the unstable
DispatchFromDynfor cell types, allowing downstream experimentation with custom method receivers. - Document that
fmt::Arguments::as_str()may returnSome(_)in more cases after optimization, subject to change. - Implement
AsFdandAsRawFdforRc. CStr::from_bytes_until_nulcore::ffi::FromBytesUntilNulErrorSocketAddr::newSocketAddr::ipSocketAddr::portSocketAddr::is_ipv4SocketAddr::is_ipv6SocketAddrV4::newSocketAddrV4::ipSocketAddrV4::portSocketAddrV6::newSocketAddrV6::ipSocketAddrV6::portSocketAddrV6::flowinfoSocketAddrV6::scope_id
- The
rust-analysiscomponent fromrustupnow only contains a warning placeholder. This was primarily intended for RLS, and the corresponding-Zsave-analysisflag has been removed from the compiler as well. - Unaligned references to packed fields are now a hard error. This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
- Update the minimum external LLVM to 14.
- Cargo now emits errors on invalid characters in a registry token.
- When
default-featuresis set to false of a workspace dependency, and an inherited dependency of a member hasdefault-features = true, Cargo will enable default features of that dependency. - Cargo denies
CARGO_HOMEin the[env]configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended. - Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.
- The Rust distribution no longer always includes rustdoc
Full Changelog
Language
--------
- Deriving built-in traits on packed structs works with Copy fields.
- Stabilize the cmpxchg16b target feature on x86 and x86_64.
- Improve analysis of trait bounds for associated types.
- Allow associated types to be used as union fields.
- Allow Self: Autotrait bounds on dyn-safe trait methods.
- Treat str as containing [u8] for auto trait purposes.
Compiler
--------
- Upgrade *-pc-windows-gnu on CI to mingw-w64 v10 and GCC 12.2.
- Rework min_choice algorithm of member constraints.
- Support true and false as boolean flags in compiler arguments.
- Default repr(C) enums to c_int size.
Libraries
---------
- Implement AsFd and AsRawFd for Rc.
Stabilized APIs
---------------
- core::ffi::FromBytesUntilNulError
These APIs are now stable in const contexts:
Cargo
-----
- Cargo now suggests cargo fix or cargo clippy --fix when compilation warnings are auto-fixable.
- Cargo now suggests cargo add if you try to install a library crate.
- Cargo now sets the CARGO_BIN_NAME environment variable also for binary examples.
Rustdoc
-----
- Vertically compact trait bound formatting.
- Only include stable lints in rustdoc::all group.
- Compute maximum Levenshtein distance based on the query.
- Remove inconsistently-present sidebar tooltips.
- Search by macro when query ends with !.
Compatibility Notes
-------------------
- The rust-analysis component from rustup now only contains a warning placeholder. This was primarily intended for RLS, and the corresponding -Zsave-analysis flag has been removed from the compiler as well.
- Unaligned references to packed fields are now a hard error. This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
- Update the minimum external LLVM to 14.
- Cargo now emits errors on invalid characters in a registry token.
- The Rust distribution no longer always includes rustdoc
If tools = [...] is set in bootstrap.toml, we will respect a missing rustdoc in that list. By
default rustdoc remains included. To retain the prior behavior explicitly add "rustdoc" to the
list.
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.
- Move format_args!() into AST (and expand it during AST lowering)