mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Rust project supports proc-macro dependent crates
This commit is contained in:
parent
df0936b4af
commit
cb13e4a2ca
3 changed files with 18 additions and 2 deletions
|
@ -446,10 +446,20 @@ fn project_json_to_crate_graph(
|
|||
|
||||
for (from, krate) in project.crates() {
|
||||
if let Some(&from) = crates.get(&from) {
|
||||
if let Some((public_deps, _proc_macro)) = &sysroot_deps {
|
||||
if let Some((public_deps, libproc_macro)) = &sysroot_deps {
|
||||
for (name, to) in public_deps.iter() {
|
||||
add_dep(&mut crate_graph, from, name.clone(), *to)
|
||||
}
|
||||
if krate.is_proc_macro {
|
||||
if let Some(proc_macro) = libproc_macro {
|
||||
add_dep(
|
||||
&mut crate_graph,
|
||||
from,
|
||||
CrateName::new("proc_macro").unwrap(),
|
||||
*proc_macro,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for dep in &krate.deps {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue