Skip to content

Add visit_attribute to Visitor, use it for unused_attribute #14741

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

Merged
merged 4 commits into from
Jun 8, 2014

Conversation

sfackler
Copy link
Member

@sfackler sfackler commented Jun 8, 2014

The lint was missing a lot of cases previously.

@@ -1836,7 +1835,6 @@ impl<'a> Visitor<()> for Context<'a> {
check_heap_item(cx, it);
check_missing_doc_item(cx, it);
check_attrs_usage(cx, it.attrs.as_slice());
Copy link
Member

Choose a reason for hiding this comment

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

Can this move to visit_attribute too?

Copy link
Member Author

Choose a reason for hiding this comment

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

The attribute usage lint has separate handling of crate and non-crate attributes, so it wouldn't work well in visit_attribute. I've actually been meaning to delete the attribute_usage lint since it's superseded by unused_attribute. Maybe that should just happen now.

sfackler added 4 commits June 7, 2014 23:21
The lint was missing a *lot* of cases previously.
It has been superseded by the unused_attribute lint.

[breaking change]
@sfackler
Copy link
Member Author

sfackler commented Jun 8, 2014

Updated

bors added a commit that referenced this pull request Jun 8, 2014
The lint was missing a *lot* of cases previously.
@bors bors closed this Jun 8, 2014
@bors bors merged commit 9452cd2 into rust-lang:master Jun 8, 2014
@sfackler sfackler deleted the visit-attr branch November 26, 2016 05:54
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.

4 participants