惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
爱范儿
爱范儿
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
博客园 - 聂微东
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
罗磊的独立博客
Jina AI
Jina AI

Rust Blog

Security Advisory for Cargo (CVE-2026-5223) | Rust Blog Security Advisory for Cargo (CVE-2026-5222) | Rust Blog Project goals update — April 2026 (end of 2025H2) | Rust Blog Rust is participating in Outreachy | Rust Blog Raising the baseline for the `nvptx64-nvidia-cuda` target | Rust Blog Announcing Google Summer of Code 2026 selected projects | Rust Blog Announcing Rust 1.95.0 | Rust Blog docs.rs: building fewer targets by default | Rust Blog Changes to WebAssembly targets and handling undefined symbols | Rust Blog Announcing Rust 1.94.1 | Rust Blog Security advisory for Cargo | Rust Blog What we heard about Rust's challenges | Rust Blog Call for Testing: Build Dir Layout v2 | Rust Blog Announcing rustup 1.29.0 | Rust Blog Announcing Rust 1.94.0 | Rust Blog 2025 State of Rust Survey Results | Rust Blog Rust debugging survey 2026 | Rust Blog Update on the October 15, 2018 incident on crates.io Announcing Rust 1.29.2 Announcing Rust 1.29 Launching the 2018 State of Rust Survey Announcing Rust 1.28 What is Rust 2018? Announcing Rust 1.27.2 Announcing Rust 1.27.1 Security Advisory for rustdoc Announcing Rust 1.27 Announcing Rust 1.26.2 Rust turns three Announcing Rust 1.26
Announcing Rust 1.26.1
The Rust Cor · 2018-05-29 · via Rust Blog

The Rust team is happy to announce a new version of Rust, 1.26.1. Rust is a systems programming language focused on safety, speed, and concurrency.

If you have a previous version of Rust installed via rustup, getting Rust 1.26.1 is as easy as:

$ rustup update stable

If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed release notes for 1.26.1 on GitHub.

What's in 1.26.1 stable

A couple of issues were found in 1.26.0 which were deemed sufficient for a patch release.

A quick summary of the changes:

  • RLS no longer interferes with command line builds
  • Rustfmt stopped badly formatting text in some cases
  • Returning from main via impl Trait where the Trait is not Termination is no longer permitted
  • ::<> (turbofish) no longer works for method arguments whose type is impl Trait
  • NaN > NaN no longer returns true in const contexts
  • rustup should no longer fail due to missing documentation on some platforms

If your code continues to compile, only the change to floating point comparisons may alter behavior.

RLS no longer interferes with command line builds

The version of RLS shipped with 1.26.0 utilized the same target directory as Cargo from the command line, which meant that switching between the two would lead to everything being recompiled. This problem was made worse for Windows users due to a filesystem lock being left unreleased by either RLS or the compiler, leading to an increased error rate. This latter bug is not yet fixed, but it happens much less frequently with the first bug fixed.

Rustfmt bad formatting

Previously, rustfmt would overindent multi-line string literals, which is now fixed.

Returning from main with impl Trait no longer works when Trait isn't Termination

Previously, we only checked that the underlying type implemented the Termination trait. It is now only possible to return concrete types on stable, as nothing except for impl Termination will work, but that trait is currently unstable to import.

For example, this will no longer work on 1.26.1:

fn main() -> impl Copy {}

But this will keep working, as it doesn't attempt to return any hidden types via impl Trait, but rather names types concretely.

fn main() -> Result<(), std::io::Error> {
    Ok(())
}

Turbofish no longer works for method arguments with impl Trait

Previously, we accidentally permitted code to specify the type of method arguments which use impl Trait. On 1.26.0, the code below would work, but how exactly turbofish (::<u32> below) should interact with impl Trait hasn't yet been decided, so we're preventing turbofish use until we can be sure the semantics are as we desire.

struct Foo;

impl Foo {
    fn bar(&self, _arg: impl Copy) {}
}

fn main() {
    Foo.bar::<u32>(0);
}

Floating point comparisons changed in constant contexts

Previously, comparing NaN as greater than other floating point numbers in a constant context would return true, which is a bug; now, this comparison returns false. In some cases that may mean that the behavior of code will change, but we expect this to be relatively unlikely.

use std::f64::NAN;
const FOO: bool = ::std::f64::NAN >= ::std::f64::NAN;
// On 1.26.0
assert_eq!(FOO, true);
// On 1.26.1
assert_eq!(FOO, false);

rustup should now work to install stable on platforms with missing docs

During the development cycle for 1.26, a change was made to how we build the documentation for the standard library, which made it so that we stopped producing the documentation component for a variety of tier 2 platforms. This led to breakage when running rustup update on those platforms, as rustup refused to partially install Rust. Some users will need to run rustup install stable instead of rustup update to make rustup avoid the missing docs component, but this should be a one-time problem.

This was unfortunately fixed too late to make it into 1.26 stable, so we added the patch for 1.26.1 to permit users to install Rust on these platforms.

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-freebsd'
info: latest update on 2018-05-10, rust version 1.26.0 (a77568041 2018-05-07)
error: component 'rust-docs' for 'x86_64-unknown-freebsd' is unavailable for download