This repository was archived by the owner on May 28, 2025. It is now read-only.
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"),
516516E0794 : include_str!( "./error_codes/E0794.md" ) ,
517517}
518518
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).
520521// E0006, // merged with E0005
521522// E0008, // cannot bind by-move into a pattern guard
522523// E0019, // merged into E0015
Original file line number Diff line number Diff line change @@ -354,7 +354,11 @@ fn check_error_codes_used(
354354
355355 for code in error_codes {
356356 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+ ) ) ;
358362 }
359363
360364 if found_codes. contains ( code) && no_longer_emitted. contains ( code) {
You can’t perform that action at this time.
0 commit comments