Skip to content

Commit

Permalink
Inline Attribute::has_name
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiasko committed Mar 11, 2021
1 parent 5c6d3bf commit 1ba71ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/attr/mod.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 1ba71ab

Please sign in to comment.