mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
internal: Use assoc items as anchors for spans
This commit is contained in:
parent
d085ade631
commit
c50c4f8bbb
4 changed files with 74 additions and 17 deletions
|
@ -139,6 +139,17 @@ impl From<ast::AssocItem> for ast::Item {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<ast::ExternItem> for ast::Item {
|
||||
fn from(extern_item: ast::ExternItem) -> Self {
|
||||
match extern_item {
|
||||
ast::ExternItem::Static(it) => ast::Item::Static(it),
|
||||
ast::ExternItem::Fn(it) => ast::Item::Fn(it),
|
||||
ast::ExternItem::MacroCall(it) => ast::Item::MacroCall(it),
|
||||
ast::ExternItem::TypeAlias(it) => ast::Item::TypeAlias(it),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum AttrKind {
|
||||
Inner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue