Skip to content

Commit 66bb2d7

Browse files
committed
Set the in-rust-tree feature for all rust-analyzer{-proc-macro-srv} steps
1 parent 5f5d248 commit 66bb2d7

File tree

7 files changed

+12
-5
lines changed

7 files changed

+12
-5
lines changed

src/bootstrap/src/core/build_steps/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl Step for RustAnalyzer {
386386
cargo_subcommand(builder.kind),
387387
"src/tools/rust-analyzer",
388388
SourceType::InTree,
389-
&["rust-analyzer/in-rust-tree".to_owned()],
389+
&["in-rust-tree".to_owned()],
390390
);
391391

392392
cargo.allow_features(crate::core::build_steps::tool::RustAnalyzer::ALLOW_FEATURES);

src/bootstrap/src/core/build_steps/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl Step for RustAnalyzer {
385385
"test",
386386
crate_path,
387387
SourceType::InTree,
388-
&["sysroot-abi".to_owned()],
388+
&["sysroot-abi".to_owned(), "in-rust-tree".to_owned()],
389389
);
390390
cargo.allow_features(tool::RustAnalyzer::ALLOW_FEATURES);
391391

src/bootstrap/src/core/build_steps/tool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ impl Step for RustAnalyzer {
647647
tool: "rust-analyzer",
648648
mode: Mode::ToolRustc,
649649
path: "src/tools/rust-analyzer",
650-
extra_features: vec!["rust-analyzer/in-rust-tree".to_owned()],
650+
extra_features: vec!["in-rust-tree".to_owned()],
651651
is_optional_tool: false,
652652
source_type: SourceType::InTree,
653653
allow_features: RustAnalyzer::ALLOW_FEATURES,
@@ -692,7 +692,7 @@ impl Step for RustAnalyzerProcMacroSrv {
692692
tool: "rust-analyzer-proc-macro-srv",
693693
mode: Mode::ToolStd,
694694
path: "src/tools/rust-analyzer/crates/proc-macro-srv-cli",
695-
extra_features: vec!["sysroot-abi".to_owned()],
695+
extra_features: vec!["sysroot-abi".to_owned(), "in-rust-tree".to_owned()],
696696
is_optional_tool: false,
697697
source_type: SourceType::InTree,
698698
allow_features: RustAnalyzer::ALLOW_FEATURES,

src/tools/rust-analyzer/crates/mbe/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ stdx.workspace = true
2525

2626
[dev-dependencies]
2727
test-utils.workspace = true
28+
29+
[features]
30+
in-rust-tree = ["parser/in-rust-tree", "syntax/in-rust-tree"]

src/tools/rust-analyzer/crates/proc-macro-srv-cli/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ proc-macro-api.workspace = true
1414

1515
[features]
1616
sysroot-abi = ["proc-macro-srv/sysroot-abi"]
17+
in-rust-tree = ["proc-macro-srv/in-rust-tree"]
18+
1719

1820
[[bin]]
1921
name = "rust-analyzer-proc-macro-srv"

src/tools/rust-analyzer/crates/proc-macro-srv/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ proc-macro-test.workspace = true
3636

3737
[features]
3838
sysroot-abi = []
39+
in-rust-tree = ["mbe/in-rust-tree"]

src/tools/rust-analyzer/crates/proc-macro-srv/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
//! rustc rather than `unstable`. (Although in general ABI compatibility is still an issue)…
1212
1313
#![cfg(feature = "sysroot-abi")]
14-
#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)]
14+
#![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span, rustc_private)]
1515
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
1616
#![allow(unreachable_pub, internal_features)]
1717

1818
extern crate proc_macro;
19+
extern crate rustc_driver as _;
1920

2021
mod dylib;
2122
mod server;

0 commit comments

Comments
 (0)