Unnamed repository; edit this file 'description' to name the repository.
Add missing rustc_private
Laurențiu Nicola 2024-09-25
parent 7ab2c17 · commit f84aa5d
-rw-r--r--crates/ide-assists/Cargo.toml3
-rw-r--r--crates/ide-assists/src/lib.rs2
-rw-r--r--crates/mbe/src/lib.rs2
3 files changed, 7 insertions, 0 deletions
diff --git a/crates/ide-assists/Cargo.toml b/crates/ide-assists/Cargo.toml
index df52562b6a..2a14fbe1e0 100644
--- a/crates/ide-assists/Cargo.toml
+++ b/crates/ide-assists/Cargo.toml
@@ -34,5 +34,8 @@ expect-test = "1.4.0"
test-utils.workspace = true
test-fixture.workspace = true
+[features]
+in-rust-tree = []
+
[lints]
workspace = true
diff --git a/crates/ide-assists/src/lib.rs b/crates/ide-assists/src/lib.rs
index b2ccd1fde8..c98655b423 100644
--- a/crates/ide-assists/src/lib.rs
+++ b/crates/ide-assists/src/lib.rs
@@ -58,6 +58,8 @@
//! See also this post:
//! <https://rust-analyzer.github.io/blog/2020/09/28/how-to-make-a-light-bulb.html>
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+
mod assist_config;
mod assist_context;
#[cfg(test)]
diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs
index dd71e46db3..ca10a2be27 100644
--- a/crates/mbe/src/lib.rs
+++ b/crates/mbe/src/lib.rs
@@ -6,6 +6,8 @@
//! The tests for this functionality live in another crate:
//! `hir_def::macro_expansion_tests::mbe`.
+#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
+
#[cfg(not(feature = "in-rust-tree"))]
extern crate ra_ap_rustc_lexer as rustc_lexer;
#[cfg(feature = "in-rust-tree")]