Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #21535 from lnicola/proc-macro-srv-cli-link
minor: Fix linking of proc-macro-srv-cli
Chayim Refael Friedman 3 months ago
parent 1055f29 · parent 86821a1 · commit f0e566b
-rw-r--r--crates/proc-macro-srv-cli/src/lib.rs5
-rw-r--r--crates/proc-macro-srv-cli/tests/legacy_json.rs4
2 files changed, 9 insertions, 0 deletions
diff --git a/crates/proc-macro-srv-cli/src/lib.rs b/crates/proc-macro-srv-cli/src/lib.rs
index 9e6f03bf46..8475c05ae8 100644
--- a/crates/proc-macro-srv-cli/src/lib.rs
+++ b/crates/proc-macro-srv-cli/src/lib.rs
@@ -2,5 +2,10 @@
//!
//! This module exposes the server main loop and protocol format for integration testing.
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+
+#[cfg(feature = "in-rust-tree")]
+extern crate rustc_driver as _;
+
#[cfg(feature = "sysroot-abi")]
pub mod main_loop;
diff --git a/crates/proc-macro-srv-cli/tests/legacy_json.rs b/crates/proc-macro-srv-cli/tests/legacy_json.rs
index c0dbfd1679..562cf0c251 100644
--- a/crates/proc-macro-srv-cli/tests/legacy_json.rs
+++ b/crates/proc-macro-srv-cli/tests/legacy_json.rs
@@ -4,6 +4,10 @@
//! channels without needing to spawn the actual server and client processes.
#![cfg(feature = "sysroot-abi")]
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+
+#[cfg(feature = "in-rust-tree")]
+extern crate rustc_driver as _;
mod common {
pub(crate) mod utils;