# Modernize Rust Code for Edition 2024

Rust migrations can be hard when new edition features change style and compiler expectations. This skill helps Claude, Codex, and Claude Code identify Rust 2024 refactoring opportunities and migration steps.

## Install

```bash
npx skillstore add emillindfors/rust-2024-migration
```

## Metadata

- Status: approved
- Slug: emillindfors-rust-2024-migration
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r1
- Version status: valid
- Tree hash: 3a41b76571e105c38df0f0798d2298677fd8b611a50894c9e443fd605c402cd5
- Author: EmilLindfors
- GitHub username: EmilLindfors
- License: MIT
- Repository: https://github.com/EmilLindfors/claude-marketplace/tree/main/plugins/rust-modern-patterns/skills/rust-2024-migration
- Ref: a06681402992ceae98ba04d54cfd4ab004862696
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 80
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/emillindfors-rust-2024-migration
- Manifest: https://skillstore.pages.dev/api/skills/emillindfors-rust-2024-migration/manifest

## Capabilities

- Identifies nested if-let and match patterns that can use let chains.
- Suggests native async closures for manual async move closure patterns.
- Explains when native async fn in traits can replace async-trait.
- Notes when async-trait is still needed for dynamic dispatch.
- Highlights Rust 2024 match ergonomics behavior changes.
- Provides a Rust 2024 migration checklist for Cargo.toml and cargo fix.

## Use Cases

- Upgrade a Crate to Rust 2024: Plan edition changes, identify likely refactors, and review minimum compiler requirements before migration.
- Simplify Async Rust Code: Find async closures and trait patterns that can use modern Rust syntax with fewer helper crates.
- Review Migration Pull Requests: Check whether Rust 2024 refactors are appropriate, readable, and compatible with project constraints.

## Prompt Templates

### Find 2024 Candidates

```
Review this Rust module and list patterns that could use Rust 2024 features. Focus on let chains, async closures, and match ergonomics.
```

### Plan Edition Upgrade

```
Create a Rust 2024 migration plan for this crate. Include Cargo.toml changes, compiler version concerns, cargo fix steps, and manual review points.
```

### Refactor Async Traits

```
Review these async trait definitions and explain which can use native async fn in traits. Identify any cases that still require async-trait for dynamic dispatch.
```

### Audit Migration Readiness

```
Audit this Rust project for Rust 2024 readiness. Prioritize risky changes, public API impact, test gaps, and refactors that should be split into separate commits.
```

## Limitations

- It provides guidance only and does not edit files automatically.
- It does not run cargo fix, cargo check, or project tests.
- Compiler version requirements must be verified for each project.
- Some recommendations need project-specific review for public APIs.

## Best Practices

- Verify the project minimum supported Rust version before applying each recommendation.
- Separate edition migration commits from optional style refactors for easier review.
- Run cargo fix, cargo check, and tests after applying Rust 2024 changes.

## Anti Patterns

- Do not replace async-trait when dynamic dispatch still requires it.
- Do not apply let chains when they make complex conditions harder to read.
- Do not change the edition without checking downstream users and public API impact.

## Security Audit

- Audited at: 2026-07-06T15:26:14.671\+00:00
- Summary: All static findings are false positives caused by Markdown fenced Rust, TOML, and bash examples, not executable Ruby or shell backtick use. The only sensitive-data hit is an example Rust variable named db, not a database file or secret. No prompt injection, exfiltration intent, or unsafe tool use was found in SKILL.md.

## Stats

- Views: 179
- Downloads: 9
- Favorites: 0
- Popularity score: 0
