rust-doctor · Error Handling
panic-in-library
Flags `panic!()`, `todo!()`, and `unimplemented!()` macros in library code. Libraries should return errors rather than panicking, since callers cannot recover from a panic across crate boundaries.
- Severity
- error
- Confidence
- medium
- Analyzer
- syn-ast
- Default policy
- Enabled
Tags
Framework requirements
No framework requirement.
Limitations
- Syntactic analysis does not have rustc name resolution or inferred type information.
Remediation
Return `Result<T, E>` or `Option<T>` instead of panicking.
Fix capability: guidance