Reword malformed attribute input diagnostics#61140
Merged
bors merged 1 commit intorust-lang:masterfrom May 27, 2019
Merged
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
CC @rust-lang/wg-diagnostics @petrochenkov @Centril |
This comment has been minimized.
This comment has been minimized.
- Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error - Use consistend error message: "malformed `attrname` attribute input" - Provide suggestions when possible - Move note/help to label/suggestion - Use consistent wording "ill-formed" -> "malformed" - Move diagnostic logic out of parser
2e85ec1 to
609ffa1
Compare
Member
Collaborator
|
📌 Commit 609ffa1 has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
May 27, 2019
…lwoerister Reword malformed attribute input diagnostics - Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error - Use consistend error message: "malformed `attrname` attribute input" - Provide suggestions when possible - Move note/help to label/suggestion - Use consistent wording "ill-formed" -> "malformed" - Move diagnostic logic out of parser Split up from rust-lang#61026, where there's prior conversation.
|
|
||
| match attr.parse_meta(self.context.parse_sess) { | ||
| Ok(meta) => if !should_skip(name) && !template.compatible(&meta.node) { | ||
| let error_msg = format!("malformed `{}` attribute input", name); |
Contributor
There was a problem hiding this comment.
AFAIK, "malformed" is usually used in context of biology, like "malformed foetus/limb".
"Ill-formed" is something not fitting into a language/grammar.
Contributor
There was a problem hiding this comment.
🤷♂ I've heard malformed being used wrt. syntax as well; a google search does give plenty of results for "malformed syntax". I've also used "malformed" in the context of grammar myself before.
Collaborator
bors
added a commit
that referenced
this pull request
May 27, 2019
Reword malformed attribute input diagnostics - Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error - Use consistend error message: "malformed `attrname` attribute input" - Provide suggestions when possible - Move note/help to label/suggestion - Use consistent wording "ill-formed" -> "malformed" - Move diagnostic logic out of parser Split up from #61026, where there's prior conversation.
Collaborator
|
☀️ Test successful - checks-travis, status-appveyor |
This was referenced May 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cfg_attrattributederiveattribute errorattrnameattribute input"Split up from #61026, where there's prior conversation.