File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
compiler/rustc_error_codes/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -516,7 +516,8 @@ E0793: include_str!("./error_codes/E0793.md"),
516
516
E0794 : include_str!( "./error_codes/E0794.md" ) ,
517
517
}
518
518
519
- // Undocumented removed error codes. Note that many removed error codes are documented.
519
+ // Undocumented removed error codes. Note that many removed error codes are kept in the list above
520
+ // and marked as no-longer emitted with a note in the markdown file (see E0001 for an example).
520
521
// E0006, // merged with E0005
521
522
// E0008, // cannot bind by-move into a pattern guard
522
523
// E0019, // merged into E0015
Original file line number Diff line number Diff line change @@ -354,7 +354,11 @@ fn check_error_codes_used(
354
354
355
355
for code in error_codes {
356
356
if !found_codes. contains ( code) && !no_longer_emitted. contains ( code) {
357
- errors. push ( format ! ( "Error code `{code}` exists, but is not emitted by the compiler!" ) )
357
+ errors. push ( format ! (
358
+ "Error code `{code}` exists, but is not emitted by the compiler!\n \
359
+ Please mark the code as no longer emitted by adding the following note to the top of the `EXXXX.md` file:\n \
360
+ `#### Note: this error code is no longer emitted by the compiler`"
361
+ ) ) ;
358
362
}
359
363
360
364
if found_codes. contains ( code) && no_longer_emitted. contains ( code) {
You can’t perform that action at this time.
0 commit comments