Skip to content

Unique IDs for compiler errors/warnings/etc... #1108

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
vemilyus opened this issue May 6, 2015 · 3 comments
Closed

Unique IDs for compiler errors/warnings/etc... #1108

vemilyus opened this issue May 6, 2015 · 3 comments

Comments

@vemilyus
Copy link

vemilyus commented May 6, 2015

Hi, I don't know if that has come up yet (a quick search didn't turn up anything) but I think that all messages of the compiler should have a hardcoded, unique ID that serves the following purposes:

  1. Makes it easier to find other people experiencing the same problem
  2. Reference documents that contain possible reasons and solutions for errors/warnings sorted by ID
  3. Helps future IDEs to parse compiler message more correctly and display them to the user in whatever form they prefer (Currently you'd need a natural language AI for something like that)
@nagisa
Copy link
Member

nagisa commented May 6, 2015

We already have them as well as explanations via rustc --epxplain argument. Not all of the errors can (yet) or do have a code assigned.

Try rustc --explain=E0001

@vemilyus
Copy link
Author

vemilyus commented May 6, 2015

Awesome, I was not aware of that... I guess we can close that one, shortest issue-lifetime ever.
Still I think I'm gonna get in on this, something basic like a borrow-error should have an Id.

Also, I couldn't find a mention of --explain anywhere in the docs, must have been an oversight.

@huonw
Copy link
Member

huonw commented May 6, 2015

I believe the suggestion to pass --explain get printed when an error occurs, and until recently there haven't been many detailed explanations so there hasn't been much point emphasising it. However, there's now a lot more explanations and rust-lang/rust#25062 will soon be online.

Anyway, I'll close this as "already implemented". Thanks for filing. :)

@huonw huonw closed this as completed May 6, 2015
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

No branches or pull requests

3 participants