Skip to content

Glossary: Rust in Practice

doc test

Also written: doc tests, documentation test

A code example inside a `///` comment, usually under `# Examples`, that `cargo test` compiles and runs to keep docs correct.

Where the book teaches it

Related terms

cargo docdoc comment