mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Inline Attribute::has_name
This commit is contained in:
parent
5c6d3bf389
commit
1ba71abddd
@ -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…
Reference in New Issue
Block a user