Inline Attribute::has_name
This commit is contained in:
parent
5c6d3bf389
commit
1ba71abddd
1 changed files with 1 additions and 0 deletions
|
@ -120,6 +120,7 @@ impl NestedMetaItem {
|
|||
}
|
||||
|
||||
impl Attribute {
|
||||
#[inline]
|
||||
pub fn has_name(&self, name: Symbol) -> bool {
|
||||
match self.kind {
|
||||
AttrKind::Normal(ref item, _) => item.path == name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue