Skip to content

Correct procedure to retire compile diagnostic codes #16449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
huonw opened this issue Aug 12, 2014 · 3 comments · Fixed by #17016 or #17333
Closed

Correct procedure to retire compile diagnostic codes #16449

huonw opened this issue Aug 12, 2014 · 3 comments · Fixed by #17016 or #17333

Comments

@huonw
Copy link
Member

huonw commented Aug 12, 2014

Currently the rustc bootstrap has a persistent warning: diagnostic code E0123 never used warning. The E0123 code was introduced and then removed, but it was apparently not retired correctly.

Do we have a procedure for retirement? (just delete the declaration line?)

cc @jakub-

@steveklabnik
Copy link
Member

In general, I would like to see error codes be immutable, so that they aren't re-used for a different error later.

@huonw
Copy link
Member Author

huonw commented Aug 12, 2014

I believe that's the plan; if we are deleting to retire, we theoretically achieve that by only adding incrementally to the end of the code declarations (I guess we'd have to be a bit careful if an entry last in the list is retired).

@ghost
Copy link

ghost commented Aug 12, 2014

Yes, we should be removing unused codes. Sorry for not keeping up with these, busy times. :) Removing the code from diagnostics.rs is sufficient.

Error codes are definitely not supposed to be reused as Steve is saying. As long as we only keep adding codes to the end of the list, we're set, although some kind of an informatory comment in the file wouldn't hurt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants