mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Various small fixes
This commit is contained in:
parent
e63e323823
commit
556f0c6704
6 changed files with 22 additions and 20 deletions
|
@ -498,10 +498,7 @@ impl_from!(Macro2Id, MacroRulesId, ProcMacroId for MacroId);
|
|||
|
||||
impl MacroId {
|
||||
pub fn is_attribute(self, db: &dyn db::DefDatabase) -> bool {
|
||||
match self {
|
||||
MacroId::ProcMacroId(it) => it.lookup(db).kind == ProcMacroKind::Attr,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, MacroId::ProcMacroId(it) if it.lookup(db).kind == ProcMacroKind::Attr)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue