Auto merge of #15652 - Veykril:format_to, r=lnicola

minor: Various small fixes
This commit is contained in:
bors 2023-09-22 09:06:06 +00:00
commit 4a8622c8fa
6 changed files with 22 additions and 20 deletions

View file

@ -499,10 +499,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)
}
}