Rust 1.78 Released: New Linting, Stabilized APIs, and Performance Improvements

January 13, 2024 5 min read
Rust programming language logo with version 1.78

Rust 1.78 Released: New Linting, Stabilized APIs, and Performance Improvements

The Rust team has published version 1.78, continuing the six-week release cadence with a focus on developer experience and performance.

Highlights

New Clippy Lints

  • redundant_closure_for_method_calls - catches unnecessary closures
  • manual_map - suggests using .map() instead of manual matching
  • unnecessary_lazy_evaluation - flags lazy eval where eager is fine

Stabilized APIs

#### HashMap::get_many_mut ````rust let mut map = HashMap::new(); map.insert("a", 1); map.insert("b", 2);

// Now stable! let [a, b] = map.get_many_mut(["a", "b"]).unwrap(); a += 10; b += 20; ````

#### Option::is_some_and / is_none_or Convenient predicates for Option handling: ```rust if opt.is_some_and(|x| x > 10) { ... } if opt.is_none_or(|x| x <= 10) { ... } ```

Compiler Performance

  • 10-15% faster incremental compilation
  • Improved parallel codegen utilization
  • Reduced memory usage during type checking

Cargo Improvements

  • cargo check --tests now checks test code
  • Better error messages for feature unification
  • cargo metadata includes edition info

Upgrade Guide

```bash rustup update stable ```

No breaking changes in this release.

Key Takeaways

  • New clippy lints catch common patterns
  • `get_many_mut` finally stabilized for HashMap
  • 10-15% faster incremental compilation
  • No breaking changes - safe to upgrade

Frequently Asked Questions

Is Rust 1.78 a breaking release?

No, Rust maintains backward compatibility. No breaking changes in 1.78.

What's the MSRV for Rust 1.78?

Minimum Supported Rust Version remains 1.56.1 for the standard library.

How do I update?

Run `rustup update stable` in your terminal.

Related on TechPulse

Sources

Stay in the loop

Get the top tech & gaming stories delivered to your inbox. No spam, unsubscribe anytime.

Share X LinkedIn Facebook