mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
tell people what to do when removing an error code
This commit is contained in:
parent
b60f7b51a2
commit
d7c8950838
@ -516,7 +516,8 @@ E0793: include_str!("./error_codes/E0793.md"),
|
||||
E0794: include_str!("./error_codes/E0794.md"),
|
||||
}
|
||||
|
||||
// Undocumented removed error codes. Note that many removed error codes are documented.
|
||||
// Undocumented removed error codes. Note that many removed error codes are kept in the list above
|
||||
// and marked as no-longer emitted with a note in the markdown file (see E0001 for an example).
|
||||
// E0006, // merged with E0005
|
||||
// E0008, // cannot bind by-move into a pattern guard
|
||||
// E0019, // merged into E0015
|
||||
|
@ -354,7 +354,11 @@ fn check_error_codes_used(
|
||||
|
||||
for code in error_codes {
|
||||
if !found_codes.contains(code) && !no_longer_emitted.contains(code) {
|
||||
errors.push(format!("Error code `{code}` exists, but is not emitted by the compiler!"))
|
||||
errors.push(format!(
|
||||
"Error code `{code}` exists, but is not emitted by the compiler!\n\
|
||||
Please mark the code as no longer emitted by adding the following note to the top of the `EXXXX.md` file:\n\
|
||||
`#### Note: this error code is no longer emitted by the compiler`"
|
||||
));
|
||||
}
|
||||
|
||||
if found_codes.contains(code) && no_longer_emitted.contains(code) {
|
||||
|
Loading…
Reference in New Issue
Block a user