about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-01-09 08:56:53 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2024-01-09 09:52:58 +0200
commit0ae73738adfbe0a6eaceed6b198cd3a124bce77c (patch)
treebbf3130539a02df2277e2cd01104042c72b6abe3
parentf52f2f9c3ce6dc72d62b9f201fecf70c0b419234 (diff)
downloadrust-0ae73738adfbe0a6eaceed6b198cd3a124bce77c.tar.gz
rust-0ae73738adfbe0a6eaceed6b198cd3a124bce77c.zip
Try to fix feature gates
-rw-r--r--crates/proc-macro-srv/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/proc-macro-srv/src/lib.rs b/crates/proc-macro-srv/src/lib.rs
index f1575a5b0bd..67b9f57a163 100644
--- a/crates/proc-macro-srv/src/lib.rs
+++ b/crates/proc-macro-srv/src/lib.rs
@@ -11,11 +11,13 @@
 //!   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, rustc_private)]
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
 #![warn(rust_2018_idioms, unused_lifetimes)]
 #![allow(unreachable_pub, internal_features)]
 
 extern crate proc_macro;
+#[cfg(feature = "in-rust-tree")]
 extern crate rustc_driver as _;
 
 mod dylib;