Latest in branch 1.74
1.74.1
Released 07 Dec 2023
(2 years ago)
SoftwareRust
Version1.74
Initial release1.74.0
16 Nov 2023
(2 years ago)
Latest release1.74.1
07 Dec 2023
(2 years ago)
Support status28 Dec 2023
(Ended 2 years, 5 months ago)
Release noteshttps://github.com/rust-lang/rust/releases/tag/1.74.1
Source codehttps://github.com/rust-lang/rust/tree/1.74.1
Downloadhttps://github.com/rust-lang/rust/releases/tag/1.74.1
Rust 1.74 ReleasesView full list

What Is New in Rust 1.74

CategoryHighlights
New FeaturesLint configuration in Cargo.toml, credential providers and authenticated private registries, projections in opaque return types, many APIs stabilized for const use.
ImprovementsCargo now tracks lint configuration changes for incremental rebuilds; OS minimum versions clarified.
Breaking ChangesApple platform minimum versions raised to macOS 10.12, iOS 10, tvOS 10.

How can I configure compiler and Clippy lints directly in Cargo.toml?

Rust 1.74 lets you declare lint levels in the manifest, eliminating the need for global RUSTFLAGS or crate-level attributes.

  • Add a [lints] table for the current package or a [workspace.lints] table for the whole workspace.
  • Specify the source (rust or clippy) and the desired level (forbid, deny, warn, allow).
[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
enum_glob_use = "deny"

Cargo records these settings and only rebuilds crates when the lint configuration changes, keeping CI fast.

What's new for private Cargo registries and credential handling?

Rust 1.74 introduces built-in credential providers and optional authentication for all registry operations.

  • Credential providers integrate with the OS keyring on Linux, macOS, and Windows, reducing token leakage risk.
  • Registries can now require authentication for fetching as well as publishing, enabling truly private crate hosting.
  • Custom providers can be implemented to fetch tokens from vaults, CI environments, or other secret stores.

Configure a provider in .cargo/config.toml and enable registry.auth = true on the registry entry.

Can I use Self and associated types in opaque return types like async fn and impl Trait?

Yes, Rust 1.74 lifts the previous restriction, allowing Self and associated types inside impl Trait and async return positions.

struct Wrapper<'a, T>(&'a T);

impl Wrapper<'_, ()> {
    async fn async_fn() -> Self { /* ... */ }
    fn impl_trait() -> impl Iterator { /* ... */ }
}

This change simplifies generic library code and aligns the language with common expectations around opaque types.

Which new APIs are stable and usable in const contexts?

Rust 1.74 stabilizes several conversion and error APIs for const evaluation.

  • core::num::Saturating arithmetic.
  • std::process::Stdio and child I/O types implement From in const.
  • FFI string helpers: OsString::from_encoded_bytes_unchecked, OsString::into_encoded_bytes, OsStr::from_encoded_bytes_unchecked, OsStr::as_encoded_bytes.
  • std::io::Error::other for custom error kinds.
  • Various From implementations for arrays, slices, Arc, and Rc in const.

These additions let you build more compile-time data structures without resorting to runtime hacks.

What are the new minimum platform requirements for Apple targets?

Rust 1.74 now requires macOS 10.12 Sierra, iOS 10, and tvOS 10 as the lowest supported versions.

This matters if you ship binaries for older Apple devices; you'll need to bump your deployment targets or stay on an earlier Rust release.

Frequently Asked Questions

Does Rust 1.74 allow lint configuration without using RUSTFLAGS?
Yes you can set lint levels in Cargo.toml under a [lints] table instead of passing flags.

How do I enable authentication for a private Cargo registry?
Configure a credential provider in .cargo/config.toml and set registry.auth = true for the registry entry.

Can I return Self from an async function using impl Trait in 1.74?
Yes, async fn async_fn() -> Self is now allowed and works as expected.

Which new const APIs are available in Rust 1.74?
Core::num::Saturating, std::process::Stdio From impls, OsString/OsStr encoded byte helpers, std::io::Error::other, and array-to-Vec conversions are now const.

Do I need to update my macOS deployment target after upgrading to Rust 1.74?
Yes the minimum supported macOS version is now 10.12 Sierra.

Is there any change to how From is implemented for process stdio?
From for std::process::Stdio is now stable and can be used in const contexts.

Releases In Branch 1.74

VersionRelease date
1.74.107 Dec 2023
(2 years ago)
1.74.016 Nov 2023
(2 years ago)