1
Fork 0

Refactor Attribute to use Path and TokenStream instead of MetaItem.

This commit is contained in:
Jeffrey Seyfried 2017-03-03 09:23:59 +00:00
parent 460bf55f8a
commit 68c1cc68b4
41 changed files with 623 additions and 371 deletions

View file

@ -120,11 +120,12 @@ impl<'a> CheckAttrVisitor<'a> {
}
fn check_attribute(&self, attr: &ast::Attribute, target: Target) {
let name: &str = &attr.name().as_str();
match name {
"inline" => self.check_inline(attr, target),
"repr" => self.check_repr(attr, target),
_ => (),
if let Some(name) = attr.name() {
match &*name.as_str() {
"inline" => self.check_inline(attr, target),
"repr" => self.check_repr(attr, target),
_ => (),
}
}
}
}