rust-doctor · Framework
tokio-main-missing
Flags `async fn main()` without `#[tokio::main]` (or equivalent runtime attribute). Without it, the async runtime is not initialized and the program won't compile or will panic.
- Severity
- error
- Confidence
- medium
- Analyzer
- syn-ast
- Default policy
- Enabled
Tags
Framework requirements
tokio >=1,<2Features: macros, rtasync-std >=1,<2Features: attributessmol >=1,<3
Limitations
- Syntactic analysis does not have rustc name resolution or inferred type information.
Remediation
Add `#[tokio::main]` above `async fn main()`.
Fix capability: guidance