.opencode/commands/rust-build.md
Fix Rust build, clippy, and dependency errors: $ARGUMENTS
cargo check 2>&1cargo clippy -- -D warnings 2>&1cannot borrow `x` as mutable because it is also borrowed as immutable
Fix: Restructure to end immutable borrow first; clone only if justified
mismatched types: expected `T`, found `U`
Fix: Add .into(), as, or explicit type conversion
unresolved import `crate::module`
Fix: Fix the use path or declare the module (add Cargo.toml deps only for external crates)
does not live long enough
Fix: Use owned type or add lifetime annotation
the trait `X` is not implemented for `Y`
Fix: Add #[derive(Trait)] or implement manually
cargo fmt compliancecargo check 2>&1
cargo clippy -- -D warnings 2>&1
cargo fmt --check 2>&1
cargo tree --duplicates
cargo test
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.