Skip to content

Conversation

@zackmdavis
Copy link
Contributor

This is an item under #32777.

r? @GuillaumeGomez

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

"##,

E0429: r##"
To import a namespace itself in addition to some of its members, the `self`
Copy link
Member

@GuillaumeGomez GuillaumeGomez May 30, 2016

Choose a reason for hiding this comment

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

This paragraph should just be the description of the error, not how to fix it. Put this paragraph just after the erroneous code example and replace it here by the error description (I think I repeated myself a lot in here haha).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Better?

@GuillaumeGomez
Copy link
Member

I liked the original explanation, it was more complete than the actual one. Could you re-use it or expand the current one please?

@zackmdavis
Copy link
Contributor Author

@GuillaumeGomez

I liked the original explanation, it was more complete than the actual one. Could you re-use it

Unfortunately, I'm not sure I understand what you mean; both my initial submission and the revision would seem to cover the same information:

  • self can't be used alone (second sentence as of a2b7dfa, first sentence as of 06ebda8)
  • to import a namespace as well as some members, self can be used in braces (first and last sentences as of a2b7dfa; sentence after the erroneous snippet as of 06ebda8)
  • if you just want to use the namespace, you don't need to bother with self (first sentence after the erroneous snippet as of a2b7dfa; last sentence as of 06ebda8)

What made the first one (a2b7dfa) feel more complete to you?

In that, initial, draft, my outline was "start with a context-setting 'topic sentence' explaining what this brace-syntax feature is about, then explain the error, then point out how to just use the namespace itself, then have an example of the typical ::{self, OtherImport} usage". After you pointed out that we want to start with a description of the error itself (without excessive contextualization), it seemed more parsimonious to combine the explanation of the brace syntax with the sentence introducing the typical-usage-of-brace-syntax snippet.

@GuillaumeGomez
Copy link
Member

Hum... I see your point. Then I have nothing to add. Thanks!

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 4, 2016

📌 Commit 06ebda8 has been approved by GuillaumeGomez

eddyb added a commit to eddyb/rust that referenced this pull request Jun 6, 2016
…meGomez

add explanation for E0429 (`self` use declaration must use brace syntax)

This is an item under rust-lang#32777.

r? @GuillaumeGomez
@eddyb eddyb merged commit 06ebda8 into rust-lang:master Jun 6, 2016
@zackmdavis zackmdavis deleted the explain_E0429 branch October 18, 2016 01:31
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.

5 participants