Skip to content

Commit a738737

Browse files
committed
Auto merge of #14297 - Veykril:proc-macro-deps, r=Veykril
Add core lib to proc_macro dependencies Fixes rust-lang/rust-analyzer#14292
2 parents 8e404f4 + d8c80e7 commit a738737

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

crates/project-model/src/sysroot.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,7 @@ unwind
276276
std_detect
277277
test";
278278

279-
const PROC_MACRO_DEPS: &str = "std";
279+
// core is required for our builtin derives to work in the proc_macro lib currently
280+
const PROC_MACRO_DEPS: &str = "
281+
std
282+
core";

crates/project-model/src/tests.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,15 @@ fn rust_project_hello_world_project_model() {
15471547
),
15481548
prelude: true,
15491549
},
1550+
Dependency {
1551+
crate_id: CrateId(
1552+
1,
1553+
),
1554+
name: CrateName(
1555+
"core",
1556+
),
1557+
prelude: true,
1558+
},
15501559
],
15511560
proc_macro: Err(
15521561
"no proc macro loaded for sysroot crate",

0 commit comments

Comments
 (0)