mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Expand attribute macros on impl and trait items
This commit is contained in:
parent
3eddda6f4c
commit
3ff68f25b8
8 changed files with 200 additions and 73 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue