From 5a76e97a64894eefd8a24f41ba1d94f067ced512 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Thu, 21 Nov 2024 10:58:56 -0800 Subject: [PATCH] Add instructions to test error code docs (#2145) --- src/diagnostics/error-codes.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/diagnostics/error-codes.md b/src/diagnostics/error-codes.md index fc2fe190c..1b6b87e4c 100644 --- a/src/diagnostics/error-codes.md +++ b/src/diagnostics/error-codes.md @@ -93,3 +93,12 @@ struct_span_code_err!(...) For an example of a PR adding an error code, see [#76143]. [#76143]: https://github.com/rust-lang/rust/pull/76143 + +## Running error code doctests + +To test the examples added in `rustc_error_codes/src/error_codes`, run the +error index generator using: + +``` +./x test ./src/tools/error_index_generator +```