Skip to content

Commit 228510b

Browse files
committed
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.
1 parent d2d91b4 commit 228510b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/tools/lint-docs/src/main.rs

+13
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ use std::path::PathBuf;
44
fn main() {
55
if let Err(e) = doit() {
66
eprintln!("error: {}", e);
7+
eprintln!(
8+
"
9+
This error was generated by the lint-docs tool.
10+
This tool extracts documentation for lints from the source code and places
11+
them in the rustc book. See the declare_lint! documentation
12+
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/macro.declare_lint.html
13+
for an example of the format of documentation this tool expects.
14+
15+
To re-run these tests, run: ./x.py test --keep-stage=0 src/tools/lint-docs
16+
The --keep-stage flag should be used if you have already built the compiler
17+
and are only modifying the doc comments to avoid rebuilding the compiler.
18+
"
19+
);
720
std::process::exit(1);
821
}
922
}

0 commit comments

Comments
 (0)