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

推荐订阅源

G
Google Developers Blog
宝玉的分享
宝玉的分享
月光博客
月光博客
B
Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
博客园_首页
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
A
About on SuperTechFans
Y
Y Combinator Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
D
Docker
爱范儿
爱范儿
博客园 - 司徒正美
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net

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 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 Announcing Rust 1.26.1 Rust turns three Announcing Rust 1.26
Announcing Rust 1.29
The Rust Core Team · 2018-09-13 · via Rust Blog

The Rust team is happy to announce a new version of Rust, 1.29.0. 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.29.0 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.29.0 on GitHub.

What's in 1.29.0 stable

The 1.29 release is fairly small; Rust 1.30 and 1.31 are going to have a lot in them, and so much of the 1.29 cycle was spent preparing for those releases. The two most significant things in this release aren't even language features: they're new abilities that Cargo has grown, and they're both about lints.

  • cargo fix can automatically fix your code that has warnings
  • cargo clippy is a bunch of lints to catch common mistakes and improve your Rust code

cargo fix

With the release of Rust 1.29, Cargo has a new subcommand: cargo fix. If you've written code in Rust before, you've probably seen a compiler warning before. For example, consider this code:

fn do_something() {}

fn main() {
    for i in 0..100 {
        do_something();
    }
}

Here, we're calling do_something a hundred times. But we never use the variable i. And so Rust warns:

$ cargo build
   Compiling myprogram v0.1.0 (file:///path/to/myprogram)
warning: unused variable: `i`
 --> src\main.rs:4:9
  |
4 |     for i in 1..100 {
  |         ^ help: consider using `_i` instead
  |
  = note: #[warn(unused_variables)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.50s

See how it suggests that we use _i as a name instead? We can automatically apply that suggestion with cargo fix:

$ cargo fix
    Checking myprogram v0.1.0 (file:///C:/Users/steve/tmp/fix)
      Fixing src\main.rs (1 fix)
    Finished dev [unoptimized + debuginfo] target(s) in 0.59s

If we look at src\main.rs again, we'll see that the code has changed:

fn do_something() {}

fn main() {
    for _i in 0..100 {
        do_something();
    }
}

We're now using _i, and the warning will no longer appear.

This initial release of cargo fix only fixes up a small number of warnings. The compiler has an API for this, and it only suggests fixing lints that we're confident recommend correct code. Over time, as our suggestions improve, we'll be expanding this to automatically fix more warnings.

if you find a compiler suggestion and want to help make it fixable, please leave a comment on this issue.

cargo clippy

Speaking of warnings, you can now check out a preview of cargo clippy through Rustup. Clippy is a large number of additional warnings that you can run against your Rust code.

For example:

let mut lock_guard = mutex.lock();

std::mem::drop(&lock_guard)

operation_that_requires_mutex_to_be_unlocked();

This code is syntactically correct, but may have a deadlock! You see, we dropped a reference to lock_guard, not the guard itself. Dropping a reference is a no-op, and so this is almost certainly a bug.

We can get the preview of Clippy from Rustup:

$ rustup component add clippy-preview

and then run it:

$ cargo clippy
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.
 --> src\main.rs:5:5
  |
5 |     std::mem::drop(&lock_guard);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[deny(drop_ref)] on by default
note: argument has type &std::result::Result<std::sync::MutexGuard<'_, i32>, std::sync::PoisonError<std::sync::MutexGuard<'_, i32>>>
 --> src\main.rs:5:20
  |
5 |     std::mem::drop(&lock_guard);
  |                    ^^^^^^^^^^^
  = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#drop_ref

As you can see from that help message, you can view all of the lints that clippy offers on the web.

Please note that this is a preview; clippy has not yet reached 1.0. As such, its lints may change. We'll release a clippy component once it has stabilized; please give the preview a try and let us know how it goes.

Oh, and one more thing: you can't use clippy with cargo-fix yet, really. It's in the works!

See the detailed release notes for more.

Library stabilizations

Three APIs were stabilized this release:

Additionally, you can now compare &str and OsString.

See the detailed release notes for more.

Cargo features

We covered the two new subcommands to Cargo above, but additionally, Cargo will now try to fix up lockfiles that have been corrupted by a git merge. You can pass --locked to disable this behavior.

cargo doc has also grown a new flag: --document-private-items. By default, cargo doc only documents public things, as the docs it produces are intended for end-users. But if you're working on your own crate, and you have internal documentation for yourself to refer to, --document-private-items will generate docs for all items, not just public ones.

See the detailed release notes for more.

Contributors to 1.29.0

Many people came together to create Rust 1.29. We couldn't have done it without all of you. Thanks!