Expand attribute macros on impl and trait items
This commit is contained in:
@@ -108,6 +108,17 @@ impl HasName for Macro {
|
||||
|
||||
impl HasAttrs for Macro {}
|
||||
|
||||
impl From<ast::AssocItem> for ast::Item {
|
||||
fn from(assoc: ast::AssocItem) -> Self {
|
||||
match assoc {
|
||||
ast::AssocItem::Const(it) => ast::Item::Const(it),
|
||||
ast::AssocItem::Fn(it) => ast::Item::Fn(it),
|
||||
ast::AssocItem::MacroCall(it) => ast::Item::MacroCall(it),
|
||||
ast::AssocItem::TypeAlias(it) => ast::Item::TypeAlias(it),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum AttrKind {
|
||||
Inner,
|
||||
|
||||
Reference in New Issue
Block a user