Merge #10460
10460: fix: Only add `proc_macro` to prelude in proc-macro crates r=jonas-schievink a=jonas-schievink Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10455 bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
bf81723221
@ -563,11 +563,12 @@ fn cargo_to_crate_graph(
|
|||||||
pkg_to_lib_crate.insert(pkg, crate_id);
|
pkg_to_lib_crate.insert(pkg, crate_id);
|
||||||
}
|
}
|
||||||
if let Some(proc_macro) = libproc_macro {
|
if let Some(proc_macro) = libproc_macro {
|
||||||
add_dep(
|
add_dep_with_prelude(
|
||||||
&mut crate_graph,
|
&mut crate_graph,
|
||||||
crate_id,
|
crate_id,
|
||||||
CrateName::new("proc_macro").unwrap(),
|
CrateName::new("proc_macro").unwrap(),
|
||||||
proc_macro,
|
proc_macro,
|
||||||
|
cargo[tgt].is_proc_macro,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user