Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Documentation gate

The workspace lints missing_docs = "warn". just docs (in just gate) builds rustdoc with that warning surfaced. just docs-strict flips it to -D warnings plus -D rustdoc::broken_intra_doc_links for milestone close.

Per-chunk requirements

Every chunk must update:

  1. Crate-level //! header if the architecture changed (new module, new public surface, new feature flag).
  2. /// doc on every new public item — types, fields, variants, methods, functions. The missing_docs lint catches every miss.
  3. At least one # Examples doctest on each new public function. Doctests run via cargo test --doc (in just gate's doctest), so they double as anti-rot for the documentation.
#![allow(unused)]
fn main() {
//! Crate-level header — what this crate is for.
//!
//! # Overview
//! …
//!
//! # Quick start
//! ```rust
//! use thiscrate::Foo;
//! let foo = Foo::new();
//! foo.do_thing();
//! ```
//!
//! # Architecture
//! …
}
#![allow(unused)]
fn main() {
/// One-line summary.
///
/// Longer paragraph if needed.
///
/// # Examples
///
/// ```rust
/// # use thiscrate::Foo;
/// let foo = Foo::new();
/// assert_eq!(foo.value(), 0);
/// ```
pub fn new() -> Self { … }
}

Tooling

CommandWhat it does
just docscargo doc --workspace --no-deps. In just gate.
just docs-strictSame, with -D warnings. Run before milestone close.
just siteBuilds mdBook + rustdoc, writes target/book/.
cargo test --docRuns every # Examples block. In just gate via doctest.