mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
Inline Attribute::has_name
This commit is contained in:
@@ -120,6 +120,7 @@ pub fn name_value_literal_span(&self) -> Option<Span> {
|
||||
}
|
||||
|
||||
impl Attribute {
|
||||
#[inline]
|
||||
pub fn has_name(&self, name: Symbol) -> bool {
|
||||
match self.kind {
|
||||
AttrKind::Normal(ref item, _) => item.path == name,
|
||||
|
||||
Reference in New Issue
Block a user