Skip to content
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

Syntax codes #34637

Merged
merged 8 commits into from
Jul 12, 2016
Merged

Syntax codes #34637

merged 8 commits into from
Jul 12, 2016

Conversation

GuillaumeGomez
Copy link
Member

r? @jonathandturner

cc @steveklabnik

This is a first big shot. I'll do the second one later in the week once this one is merged.

@@ -16,31 +16,374 @@
register_long_diagnostics! {

E0533: r##"
The export_name attribute was badly formatted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/badly formatted/malformed/

@GuillaumeGomez
Copy link
Member Author

@nagisa: I think I applied all your remarks.

@@ -16,31 +16,394 @@
register_long_diagnostics! {

E0533: r##"
The export_name attribute was malformed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t you put things like export_name inside inline code element (i.e. between backticks)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about it. I decidec to change it if someone else thought the same so I will.

pub fn something() {}
```

The "issue" named attribute parameter expects a github issue number. Example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here.

@nagisa
Copy link
Member

nagisa commented Jul 4, 2016

I’m not sure describing error codes for rustc internal features (the stability things, mostly) has any meaningful purpose when considering the wider audience.

@GuillaumeGomez
Copy link
Member Author

It's always appreciated to have information right away instead of looking further. For people like me who don't work that much on internals, it's very helpful (but maybe am I the only one in this case?).

@GuillaumeGomez
Copy link
Member Author

@nagisa: Thanks for all these typos! I added backticks around keywords as well.

@@ -1,4 +1,4 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the copyright year be updated here? Should it be saying 2016 and not 2014-2016? Is the convention for this recorded anywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented Jul 5, 2016

I’m not sure describing error codes for rustc internal features (the stability things, mostly) has any meaningful purpose when considering the wider audience.

The point of error code explanations, even for the simplest errors, is to go faster. This PR fulfills this purpose. For example, if you forgot how to write a stabitility attribute or forgot a named attribute in it, you'll just have to look at the error explanation instead of looking into the code.

@GuillaumeGomez
Copy link
Member Author

I think I actually need a better explanation @nagisa about your last comment. @jonathandturner and I didn't understand your message the same way.

@GuillaumeGomez
Copy link
Member Author

On IRC:

While internal error codes are numbered with the rest of the error codes, I think they should be treated the same as non-internal error codes.

@sophiajt
Copy link
Contributor

@bors: r+

@bors
Copy link
Contributor

bors commented Jul 11, 2016

📌 Commit b777f14 has been approved by jonathandturner

@bors
Copy link
Contributor

bors commented Jul 12, 2016

⌛ Testing commit b777f14 with merge 2539c15...

bors added a commit that referenced this pull request Jul 12, 2016
Syntax codes

r? @jonathandturner

cc @steveklabnik

This is a first big shot. I'll do the second one later in the week once this one is merged.
@bors bors merged commit b777f14 into rust-lang:master Jul 12, 2016
@GuillaumeGomez GuillaumeGomez deleted the syntax_codes branch July 12, 2016 08:08
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 this pull request may close these issues.

6 participants