Skip to content

Commit 5a76e97

Browse files
authored
Add instructions to test error code docs (#2145)
1 parent 5f5e0b5 commit 5a76e97

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/diagnostics/error-codes.md

+9
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,12 @@ struct_span_code_err!(...)
9393
For an example of a PR adding an error code, see [#76143].
9494

9595
[#76143]: https://github.com/rust-lang/rust/pull/76143
96+
97+
## Running error code doctests
98+
99+
To test the examples added in `rustc_error_codes/src/error_codes`, run the
100+
error index generator using:
101+
102+
```
103+
./x test ./src/tools/error_index_generator
104+
```

0 commit comments

Comments
 (0)