mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-06 17:23:28 +08:00
1.7 KiB
1.7 KiB
description, agent, subtask
| description | agent | subtask |
|---|---|---|
| Fix Rust build errors and borrow checker issues | everything-claude-code:rust-build-resolver | true |
Rust Build Command
Fix Rust build, clippy, and dependency errors: $ARGUMENTS
Your Task
- Run cargo check:
cargo check 2>&1 - Run cargo clippy:
cargo clippy -- -D warnings 2>&1 - Fix errors one at a time
- Verify fixes don't introduce new errors
Common Rust Errors
Borrow Checker
cannot borrow `x` as mutable because it is also borrowed as immutable
Fix: Restructure to end immutable borrow first; clone only if justified
Type Mismatch
mismatched types: expected `T`, found `U`
Fix: Add .into(), as, or explicit type conversion
Missing Import
unresolved import `crate::module`
Fix: Fix the use path or declare the module (add Cargo.toml deps only for external crates)
Lifetime Errors
does not live long enough
Fix: Use owned type or add lifetime annotation
Trait Not Implemented
the trait `X` is not implemented for `Y`
Fix: Add #[derive(Trait)] or implement manually
Fix Order
- Build errors - Code must compile
- Clippy warnings - Fix suspicious constructs
- Formatting -
cargo fmtcompliance
Build Commands
cargo check 2>&1
cargo clippy -- -D warnings 2>&1
cargo fmt --check 2>&1
cargo tree --duplicates
cargo test
Verification
After fixes:
cargo check # Should succeed
cargo clippy -- -D warnings # No warnings allowed
cargo fmt --check # Formatting should pass
cargo test # Tests should pass
IMPORTANT: Fix errors only. No refactoring, no improvements. Get the build green with minimal changes.