Unnamed repository; edit this file 'description' to name the repository.
Set the `in-rust-tree`` feature for all rust-analyzer{-proc-macro-srv} steps
Lukas Wirth 2024-01-04
parent d3d7c4b · commit b83f487
-rw-r--r--crates/mbe/Cargo.toml5
-rw-r--r--crates/proc-macro-srv-cli/Cargo.toml2
-rw-r--r--crates/proc-macro-srv/Cargo.toml5
-rw-r--r--crates/proc-macro-srv/src/lib.rs3
4 files changed, 11 insertions, 4 deletions
diff --git a/crates/mbe/Cargo.toml b/crates/mbe/Cargo.toml
index f50d796e13..2046fa943a 100644
--- a/crates/mbe/Cargo.toml
+++ b/crates/mbe/Cargo.toml
@@ -27,5 +27,8 @@ span.workspace = true
[dev-dependencies]
test-utils.workspace = true
+[features]
+in-rust-tree = ["parser/in-rust-tree", "syntax/in-rust-tree"]
+
[lints]
-workspace = true \ No newline at end of file
+workspace = true
diff --git a/crates/proc-macro-srv-cli/Cargo.toml b/crates/proc-macro-srv-cli/Cargo.toml
index 980eab2696..b9e4e53492 100644
--- a/crates/proc-macro-srv-cli/Cargo.toml
+++ b/crates/proc-macro-srv-cli/Cargo.toml
@@ -14,6 +14,8 @@ proc-macro-api.workspace = true
[features]
sysroot-abi = ["proc-macro-srv/sysroot-abi"]
+in-rust-tree = ["proc-macro-srv/in-rust-tree"]
+
[[bin]]
name = "rust-analyzer-proc-macro-srv"
diff --git a/crates/proc-macro-srv/Cargo.toml b/crates/proc-macro-srv/Cargo.toml
index b6686fa5b6..54dae4eba9 100644
--- a/crates/proc-macro-srv/Cargo.toml
+++ b/crates/proc-macro-srv/Cargo.toml
@@ -37,7 +37,8 @@ expect-test = "1.4.0"
proc-macro-test.path = "./proc-macro-test"
[features]
-sysroot-abi = ["proc-macro-test/sysroot-abi"]
+sysroot-abi = []
+in-rust-tree = ["mbe/in-rust-tree"]
[lints]
-workspace = true \ No newline at end of file
+workspace = true
diff --git a/crates/proc-macro-srv/src/lib.rs b/crates/proc-macro-srv/src/lib.rs
index 7cd6df2df8..f1575a5b0b 100644
--- a/crates/proc-macro-srv/src/lib.rs
+++ b/crates/proc-macro-srv/src/lib.rs
@@ -11,11 +11,12 @@
//! rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
#![cfg(any(feature = "sysroot-abi", rust_analyzer))]
-#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
+#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span, rustc_private)]
#![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(unreachable_pub, internal_features)]
extern crate proc_macro;
+extern crate rustc_driver as _;
mod dylib;
mod server;