mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Rename ProcMacroKind::FuncLike to Bang
This commit is contained in:
parent
fc0d51ae65
commit
8e324e98a1
18 changed files with 83 additions and 66 deletions
|
@ -453,8 +453,8 @@ impl ProcMacroData {
|
|||
(
|
||||
def.name,
|
||||
match def.kind {
|
||||
ProcMacroKind::CustomDerive { helpers } => Some(helpers),
|
||||
ProcMacroKind::FnLike | ProcMacroKind::Attr => None,
|
||||
ProcMacroKind::Derive { helpers } => Some(helpers),
|
||||
ProcMacroKind::Bang | ProcMacroKind::Attr => None,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
|
@ -484,10 +484,11 @@ impl ExternCrateDeclData {
|
|||
let extern_crate = &item_tree[loc.id.value];
|
||||
|
||||
let name = extern_crate.name.clone();
|
||||
let krate = loc.container.krate();
|
||||
let crate_id = if name == hir_expand::name![self] {
|
||||
Some(loc.container.krate())
|
||||
Some(krate)
|
||||
} else {
|
||||
db.crate_def_map(loc.container.krate())
|
||||
db.crate_def_map(krate)
|
||||
.extern_prelude()
|
||||
.find(|&(prelude_name, ..)| *prelude_name == name)
|
||||
.map(|(_, (root, _))| root.krate())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue