Vault 资讯瀑布官方2026.07.09 20:25 UTC+8

rust-lang/rust 发布 1.97.0

Rust 1.97.0 发布:语言特性更新、平台支持调整、稳定 API 与 Cargo 变更。

语言

  • 对于 must use lint,将 Result<T, Uninhabited>ControlFlow<Uninhabited, T> 视为与 T 等价(PR #148214
  • 为二进制 crate 中未使用的 pub 项添加默认允许的 dead_code_pub_in_binary lint(PR #149509
  • 稳定 div32lam-bhlamcasld-seq-sascq 目标特性(PR #154510
  • 稳定 cfg(target_has_atomic_primitive_alignment)PR #155006
  • 在更多情况下允许在导入中使用尾部 selfPR #155137

平台支持

  • nvptx64-nvidia-cuda:放弃对旧架构和旧 ISA 的支持(PR #152443

有关 Rust 分级平台支持的更多信息,请参阅 平台支持页面

稳定 API

这些先前稳定的 API 现在在 const 上下文中稳定:

Cargo

rust-lang/rust released 1.97.0

Language

Platform Support

Refer to Rust's platform support page for more information on Rust's tiered platform support.

Stabilized APIs

These previously stable APIs are now stable in const contexts:

Cargo

Rustdoc

Compatibility Notes

查看原始发布