Latest in branch 1.29
1.29.2
Released 12 Oct 2018
(7 years ago)
SoftwareRust
Version1.29
Initial release1.29.0
13 Sep 2018
(7 years ago)
Latest release1.29.2
12 Oct 2018
(7 years ago)
Support status26 Oct 2018
(Ended 7 years ago)
Release noteshttps://github.com/rust-lang/rust/releases/tag/1.29.2
Source codehttps://github.com/rust-lang/rust/tree/1.29.2
Downloadhttps://github.com/rust-lang/rust/releases/tag/1.29.2
Rust 1.29 ReleasesView full list

What Is New in Rust 1.29

CategoryHighlights
New Featurescargo fix subcommand, cargo clippy preview, cargo doc --document-private-items, lockfile auto-repair
ImprovementsLockfile merge recovery, expanded lint coverage, three standard-library APIs stabilized (including &str vs OsString comparison)

How can cargo fix automatically resolve compiler warnings?

cargo fix can apply compiler-suggested fixes to your code without manual edits.

In practice you run the command and Cargo rewrites the source files where a safe fix exists.

$ cargo fix
    Checking mycrate v0.1.0
      Fixing src/main.rs (1 fix)
    Finished dev [unoptimized + debuginfo] target(s)

After the run the warning disappears because the unused variable was renamed to _i.

What is cargo clippy and why should I run it?

cargo clippy runs an extensive set of lints that catch subtle bugs and style issues.

This matters if you want early detection of patterns that the compiler does not flag, such as dead-locks caused by dropping a reference.

$ rustup component add clippy-preview
$ cargo clippy
error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing.

The output points to the drop_ref lint and suggests correcting the call.

How do I generate documentation for private items with cargo doc?

Use cargo doc --document-private-items to include non-public symbols in the generated docs.

This is useful for internal teams that need full API visibility while working on a crate.

$ cargo doc --document-private-items
   Compiling mycrate v0.1.0
   Finished dev [unoptimized + debuginfo] target(s) in 0.45s
   Documenting mycrate v0.1.0

The resulting HTML contains pages for private functions, structs, and modules.

Which standard library APIs became stable in Rust 1.29?

Three APIs were stabilized, giving you more ergonomic primitives out of the box.

  • Comparison between &str and OsString is now stable.
  • Two additional APIs (not named in the release notes) were marked stable for general use.
  • These stabilizations reduce the need for external crates for common string handling tasks.

Frequently Asked Questions

Does cargo fix modify my source files in place?
Yes it rewrites the files applying the suggested changes.

Can I use cargo clippy together with cargo fix today?
No the integration is not yet supported in 1.29.

How do I install the clippy preview component?
Run rustup component add clippy-preview.

Will cargo doc --document-private-items affect release builds?
It only changes the documentation output, not the compiled binary.

Are there any breaking changes in Rust 1.29?
No breaking changes were introduced in this release.

Which lint does clippy flag for dropping a reference?
The drop_ref lint, example: std::mem::drop(&lock_guard).

Releases In Branch 1.29

VersionRelease date
1.29.212 Oct 2018
(7 years ago)
1.29.125 Sep 2018
(7 years ago)
1.29.013 Sep 2018
(7 years ago)