rust-lang/rustc-dev-guide

The `{{produces}}` special marker isn't explained in lint docs

Opened this issue · 2 comments

Lint docs e.g. in compiler/rustc_lint_defs/src/builtin.rs have this special {{produces}} annotation, we should explain what it does (I haven't quite looked at the exact behavior).

I think it's to generate a snapshot of the lint output for use by lint docs book itself.

... I think I vaguely recall maybe a lint-docs bootstrap tool? Not sure.

The format for a lint is described in the declare_lint docs. It seems like a good idea to link to that from https://rustc-dev-guide.rust-lang.org/diagnostics.html#declaring-a-lint.