-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Long diagnostic for E0541 #51490
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
Long diagnostic for E0541 #51490
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/libsyntax/diagnostic_list.rs
Outdated
reason="Example invalid meta item. Should be 'note'") // error: unknown meta item | ||
] | ||
fn deprecated_function() {} | ||
|
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.
You didn't end the code block.
src/libsyntax/diagnostic_list.rs
Outdated
note="This is a valid meta item for the deprecated attribute." | ||
)] | ||
fn deprecated_function() {} | ||
"##, |
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.
You didn't end the code block.
src/libsyntax/diagnostic_list.rs
Outdated
Meta items are the key/value pairs inside of an attribute. The keys provided must be one of the | ||
valid keys for the specified attribute. | ||
|
||
To fix the problem, either remove the unknown meta item, or rename it it you provided the wrong |
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.
"or rename it it you provided"?
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
src/libsyntax/diagnostic_list.rs
Outdated
|
||
Meta items are the key/value pairs inside of an attribute. The keys provided must be one of the | ||
valid keys for the specified attribute. | ||
|
||
To fix the problem, either remove the unknown meta item, or rename it it you provided the wrong | ||
To fix the problem, either remove the unknown meta item, or rename it if you provided the wrong |
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.
Please remove the comma as well.
src/libsyntax/diagnostic_list.rs
Outdated
fn deprecated_function() {} | ||
``` | ||
|
||
Meta items are the key/value pairs inside of an attribute. The keys provided |
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.
Why not "key-value pairs" instead of "key/value pairs".
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.
It's what was used in the reference. Should probably change it there as well.
src/libsyntax/diagnostic_list.rs
Outdated
provided the wrong name. | ||
|
||
In the erroneous code example above, the wrong name was provided, so changing it | ||
to the right name fixes the error. |
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.
Please replace "error." by "error:".
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, the formulation isn't very nice. What about:
"In the erroneous code example above, the wrong name was provided, so changing to a correct one it will fix the error. Example:"
?
Thanks! @bors: r+ rollup |
📌 Commit cf3fcab has been approved by |
Long diagnostic for E0541 r? @GuillaumeGomez
☀️ Test successful - status-appveyor, status-travis |
r? @GuillaumeGomez