Are doctests painful to write or is it just me?
When I write and maintain them it feels equivalent to just opening notepad with zero IDE features.
This is what I mean by a doctest, where code is written into documentation that can be compiled
/// # Examples
///
/// ```
/// let x = 5;
/// ```
Maybe it’s a skill issue - I’m making this post in a cry for help / better guidance.
I use VSCode.
A few issues I face:
- No Rust Analyzer / IDE support (e.g. there is no way to navigate to definition)
- Ignored by cargo clippy
- Ignored by cargo check
- Ignored by cargo fmt
I love the concept of runnable documentation, but it seems way too painful to maintain them and write them to make sure they are up to the code standard and still compilable
edit: code formatting