Conversation
src/librustc_typeck/diagnostics.rs
Outdated
There was a problem hiding this comment.
This is confusing. How about "A type parameter which references Self in its default value was not specified.".
src/liblibc
Outdated
cb5c95d to
d3e82e3
Compare
|
|
||
| E0393: r##" | ||
| A type parameter which references `Self` in its default value was not specified. | ||
| Example of erroneous code: |
There was a problem hiding this comment.
"Here is an example of erroneous code"
There was a problem hiding this comment.
There will be a debate on this sentence every time, right? :)
There was a problem hiding this comment.
I won't agree with you on this one. I think it's too much "decoration" for such a simple sentence.
There was a problem hiding this comment.
Currently it's not a sentence, though. Neither is "Erroneous code example", but that reads more naturally so I'm mostly okay with that.
There was a problem hiding this comment.
Arf, people will never agree on this sentence. We should put the debate on the RFC as well.
There was a problem hiding this comment.
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.)
|
@bors r+ rollup Felix's comment makes sense |
|
📌 Commit d3e82e3 has been approved by |
|
And here ends the debate. :) |
|
⌛ Testing commit d3e82e3 with merge 77c7f3e... |
|
💔 Test failed - auto-win-gnu-64-opt |
|
@bors: retry On Fri, Apr 22, 2016 at 8:37 AM, bors [email protected] wrote:
|
Add E0393 error explanation Part of #32777. r? @Manishearth cc @steveklabnik
|
💔 Test failed - auto-mac-64-nopt-t |
src/librustc_typeck/diagnostics.rs
Outdated
|
|
||
| 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 |
There was a problem hiding this comment.
<stdin>:5:49: 5:50 error: unknown start of token: `
<stdin>:5 object type because its default value `Self` references theIt seems it doesn't like backticks in here. Should I remove them?
There was a problem hiding this comment.
Isn't the issue that there needs to be // at the beginning of line 3438?
There was a problem hiding this comment.
Oh right! I totally overpassed it... Thanks @pnkfelix!
|
Updated. |
|
@bors r+ rollup |
|
📌 Commit d648fc6 has been approved by |
Add E0393 error explanation Part of #32777. r? @Manishearth cc @steveklabnik
Part of #32777.
r? @Manishearth
cc @steveklabnik