Refactor Attribute
to use Path
and TokenStream
instead of MetaItem
.
This commit is contained in:
parent
460bf55f8a
commit
68c1cc68b4
41 changed files with 623 additions and 371 deletions
|
@ -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),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue