rust-errors-async
Installation
SKILL.md
rust-errors-async
Decodes the five recurring async error classes and gives one correct fix per class. Async errors are almost never bugs in async/.await itself: they are ordinary trait, Send, lifetime, or runtime-policy violations that surface only because async fn desugars into an anonymous state-machine Future. The fix targets the underlying violation, not the async keyword.
Cross-references: [[rust-syntax-async-await]] (async/await mechanics, desugaring), [[rust-impl-async-tokio]] (Tokio runtime setup, spawn, channels), [[rust-core-async-runtime]] (Future/Pin/Waker model), [[rust-agents-compile-fix]] (automated compile-fix loop).
When to use this skill
- The compiler reports
future cannot be sent between threads safelyorfuture is not Send. - A
tokio::spawncall fails with aSendbound error. - The compiler reports
cannot move out ofa pinned value, or... is not Unpin. - A lifetime error appears only inside an
async fnbody or signature. - The user asks "do I still need the
async_traitcrate". - The program panics at runtime with
Cannot start a runtime from within a runtime. - An async program hangs, stalls, or one slow task freezes every other task.