Skip to content

Accept unsugared docs in missing-doc lint #10867

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

Closed
wants to merge 1 commit into from

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Dec 9, 2013

Closes #10853

if !attrs.iter().any(|a| a.node.is_sugared_doc) {
if !attrs.iter().any(|a| {
match a.node.value.node {
MetaNameValue(ref name, _) if name == &@"doc" => true,
Copy link
Member

Choose a reason for hiding this comment

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

"doc" == *name will be nicer for the allocator; also, this can be MetaNameValue(ref name, _) => "doc" == *name.

Copy link
Member

Choose a reason for hiding this comment

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

(Also, this should be ast::MetaNameValue to mimic the usage in the rest of the module, rather than importing it specifically.)

@sfackler
Copy link
Member Author

sfackler commented Dec 9, 2013

@huonw updated. It's kind of weird that *name == "doc" doesn't typecheck but "doc" == *name does.

bors added a commit that referenced this pull request Dec 9, 2013
@bors bors closed this Dec 9, 2013
@sfackler sfackler deleted the unsugared-doc branch December 23, 2013 03:51
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.

missing_doc lint only accepts sugared docs
3 participants