Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint-docs: Add some extra detail to the error message.
This will hopefully help users figure out what was wrong and how
to fix it.
  • Loading branch information
ehuss committed Nov 29, 2020
commit 228510b0ec9447df6ee84450f8e3fc9b5a018745
13 changes: 13 additions & 0 deletions src/tools/lint-docs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ use std::path::PathBuf;
fn main() {
if let Err(e) = doit() {
eprintln!("error: {}", e);
eprintln!(
"
This error was generated by the lint-docs tool.
This tool extracts documentation for lints from the source code and places
them in the rustc book. See the declare_lint! documentation
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html
for an example of the format of documentation this tool expects.

To re-run these tests, run: ./x.py test --keep-stage=0 src/tools/lint-docs
The --keep-stage flag should be used if you have already built the compiler
and are only modifying the doc comments to avoid rebuilding the compiler.
"
);
std::process::exit(1);
}
}
Expand Down