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

Add E0393 error explanation #32989

Merged
merged 1 commit into from
Apr 26, 2016
Merged

Add E0393 error explanation #32989

merged 1 commit into from
Apr 26, 2016

Conversation

GuillaumeGomez
Copy link
Member

@@ -3426,6 +3426,30 @@ parameters. You can read more about it in the API documentation:
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
"##,

E0393: r##"
A type parameter which needs to be explicity specified because its
Copy link
Member

Choose a reason for hiding this comment

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

This is confusing. How about "A type parameter which references Self in its default value was not specified.".

@@ -1 +1 @@
Subproject commit 7265c17d1845354f979a39b4ceb3a6934025b2ab
Subproject commit 2278a549559c38872b4338cb002ecc2a80d860dc
Copy link
Member

Choose a reason for hiding this comment

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

this shouldn't be there

@@ -3426,6 +3426,37 @@ parameters. You can read more about it in the API documentation:
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
"##,

E0393: r##"
A type parameter which references `Self` in its default value was not specified.
Example of erroneous code:
Copy link
Member

Choose a reason for hiding this comment

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

"Here is an example of erroneous code"

Copy link
Member Author

Choose a reason for hiding this comment

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

There will be a debate on this sentence every time, right? :)

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 won't agree with you on this one. I think it's too much "decoration" for such a simple sentence.

Copy link
Member

Choose a reason for hiding this comment

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

Currently it's not a sentence, though. Neither is "Erroneous code example", but that reads more naturally so I'm mostly okay with that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Arf, people will never agree on this sentence. We should put the debate on the RFC as well.

Copy link
Member

Choose a reason for hiding this comment

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

I don't currently have an opinion about whether the phrase in question needs to take the form of a sentence or not, but I do have an opinion about the supposedly more natural alternative of "Erroneous code example":

The phrase "Example of erroneous code" is at least unambiguous about what is erroneous: the code itself.

The phrase "Erroneous code example" is less clear.

  • The adjective "Erroneous" could be interpreted as applying to the word "code", as in:

    here is some code that illustrates the error under discussion

  • or it could alternatively be interpreted as applying to the word "example", as in:

    here is an attempt at an example of some code to illustrate concept X, but the example is erroneous, and thus the example fails to actually illustrate X

(Of course one has to actually work to come up with the latter interpretation. Nonetheless, I'm generally -1 on phrasing that slip too easily into multiple potential parsings.)

@Manishearth
Copy link
Member

@bors r+ rollup

Felix's comment makes sense

@bors
Copy link
Contributor

bors commented Apr 21, 2016

📌 Commit d3e82e3 has been approved by Manishearth

@GuillaumeGomez
Copy link
Member Author

And here ends the debate. :)

@bors
Copy link
Contributor

bors commented Apr 22, 2016

⌛ Testing commit d3e82e3 with merge 77c7f3e...

@bors
Copy link
Contributor

bors commented Apr 22, 2016

💔 Test failed - auto-win-gnu-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Fri, Apr 22, 2016 at 8:37 AM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-64-opt
http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/3894


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#32989 (comment)

@bors
Copy link
Contributor

bors commented Apr 24, 2016

⌛ Testing commit d3e82e3 with merge a502229...

bors added a commit that referenced this pull request Apr 24, 2016
@bors
Copy link
Contributor

bors commented Apr 24, 2016

💔 Test failed - auto-mac-64-nopt-t


fn together_we_will_rule_the_galaxy(son: &A) {}
// error: the type parameter `T` must be explicitly specified in an
object type because its default value `Self` references the
Copy link
Member Author

Choose a reason for hiding this comment

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

<stdin>:5:49: 5:50 error: unknown start of token: `
<stdin>:5               object type because its default value `Self` references the

It seems it doesn't like backticks in here. Should I remove them?

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the issue that there needs to be // at the beginning of line 3438?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh right! I totally overpassed it... Thanks @pnkfelix!

@GuillaumeGomez
Copy link
Member Author

Updated.

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 26, 2016

📌 Commit d648fc6 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Apr 26, 2016

⌛ Testing commit d648fc6 with merge 03bef4c...

bors added a commit that referenced this pull request Apr 26, 2016
@bors bors merged commit d648fc6 into rust-lang:master Apr 26, 2016
@GuillaumeGomez GuillaumeGomez deleted the e0393 branch April 26, 2016 16:05
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