-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Update rustc --explain sentence #48559
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Mentioned @zackmdavis' concern: #48337 (comment) |
@@ -21,4 +21,4 @@ error[E0453]: allow(test_lint) overruled by outer forbid(test_lint) | |||
|
|||
error: aborting due to 2 previous errors | |||
|
|||
If you want more information on this error, try using "rustc --explain E0453" | |||
For more information about this error, try "rustc --explain E0453" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"rustc --explain E0453"
-> `rustc --explain E0453`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we start with a capital letter (seems appropriate here) then we should probably end with a dot.
@@ -43,4 +43,4 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C` | |||
error: aborting due to 4 previous errors | |||
|
|||
You've got a few errors: E0191, E0221 | |||
If you want more information on an error, try using "rustc --explain E0191" | |||
For more information about an error, try "rustc --explain E0191" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zackmdavis What do you think about "You've got a few errors" above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, do we have an English language expert here? Is the comma before "try" correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about "You've got a few errors" above?
I'd prefer "There were some errors" or "Some errors occurred."
Others might disagree with my style æsthetics, but to me, the second person (addressing the user as "you") and contractions feel like too much attempted folksiness in contrast to the "serious", "no-nonsense" tone I expect from compiler error messages.
Is the comma before "try" correct?
Yes, it's separating a dependent clause from a subsequent independent clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @zackmdavis here.
@GuillaumeGomez
Could you make the mentioned changes and then squash into 1 commit?
We should get this right on the first try (no grammatical errors, etc), I'd really like to avoid landing one more "+1,040 −1,042" PR potentially conflicting with any other PR changing UI tests.
I'll wait for your questions to have answers before updating @petrochenkov. 😄 BTW, here's the python script I used this time: from os import listdir
from os.path import isdir, isfile, join
PATHS = ["src/test/ui", "src/test/ui-fulldeps"]
def do_something(path):
files = [join(path, f) for f in listdir(path)]
for f in files:
if isdir(f):
do_something(f)
continue
if not isfile(f) or not f.endswith(".stderr"):
continue
x = open(f, "r")
content = x.read()
if "error[E" not in content:
continue
x = open(f, "w")
x.write(content.replace("If you want more information on an error, try using",
"For more information about an error, try")
.replace("If you want more information on this error, try using",
"For more information about this error, try"))
for path in PATHS:
do_something(path) |
@GuillaumeGomez |
@@ -43,4 +43,4 @@ error[E0221]: ambiguous associated type `Color` in bounds of `C` | |||
error: aborting due to 4 previous errors | |||
|
|||
You've got a few errors: E0191, E0221 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot (same as #48559 (comment)).
@petrochenkov: I didn't know such a script existed and it took me 5 minutes to write the python one so not really an issue...
That's what review are normally for (it certainly annoys me more than you). :) |
9dd743c
to
284d90c
Compare
284d90c
to
a48094d
Compare
LGTM, but let's wait until the situation about #48562 is resolved. |
☔ The latest upstream changes (presumably #48125) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing in favor of #48684 that does same rewording. |
Fixes @zackmdavis' concern.