Paste Rust compiler errors and get plain-English explanations with fixes — covers borrow checker, lifetimes, traits, types, macros, async, and more.
Install
openclaw plugins install clawhub:openclaw-rustfixopenclaw-rustfix
Paste Rust compiler errors and get plain-English explanations with fixes — covers borrow checker, lifetimes, traits, types, macros, async, and more.
Created by Riya Verma.
Installation
openclaw plugins install openclaw-rustfix
What it does
RustFix turns cryptic rustc errors into human-readable explanations with concrete fixes. It covers 25+ of the most common Rust compiler errors across every major category:
| Category | Examples |
|---|---|
| Borrow checker | E0502 (mutable + immutable borrow), E0499 (double mutable borrow) |
| Move semantics | E0382 (use after move), E0505 (move while borrowed), E0507 (move from shared ref) |
| Lifetimes | E0106 (missing lifetime), E0597 (doesn't live long enough), E0515 (returning local ref) |
| Traits | E0277 (trait not satisfied), E0599 (method not found), E0038 (object safety) |
| Types | E0308 (mismatched types), E0061 (wrong arg count) |
| Async | E0728 (await outside async), future not Send |
| Imports | E0425 (not in scope), E0432 (unresolved import), E0433 (undeclared crate) |
| Unsafe | E0133 (unsafe block required) |
| Patterns | E0004 (non-exhaustive match) |
| Macros | E0658 (unstable feature) |
Agent tools
rust_fix
Paste raw cargo build or rustc output. The plugin parses all errors, looks them up, and returns:
- What went wrong (plain English)
- How to fix it (multiple options)
- Before/after code examples
- Link to the official docs
Example prompt: "Fix this Rust error: error[E0382]: use of moved value: s"
rust_explain
Look up a specific error code and get the full breakdown.
Example prompt: "Explain Rust error E0502"
rust_errors
Browse all known errors by category.
Example prompt: "Show me all Rust borrow checker errors"
Auto-detection
RustFix hooks into tool outputs — if any tool returns text containing error[E0xxx], the plugin automatically appends explanations and fixes. No manual pasting needed.
CLI
openclaw rustfix errors # list all known errors
openclaw rustfix errors -c borrow # filter by category
openclaw rustfix lookup E0382 # look up a specific code
openclaw rustfix categories # list error categories
Running tests
npm test
37 tests covering the error database, parser, and formatter.
License
MIT
