Skip to content

Commit f4eef1c

Browse files
committed
Auto merge of #16317 - lnicola:sync-from-rust, r=lnicola
internal: sync from downstream
2 parents 12e7aa3 + f52f2f9 commit f4eef1c

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

crates/mbe/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ span.workspace = true
2727
[dev-dependencies]
2828
test-utils.workspace = true
2929

30+
[features]
31+
in-rust-tree = ["parser/in-rust-tree", "syntax/in-rust-tree"]
32+
3033
[lints]
31-
workspace = true
34+
workspace = true

crates/proc-macro-srv-cli/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ 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", "sysroot-abi"]
18+
1719

1820
[[bin]]
1921
name = "rust-analyzer-proc-macro-srv"
2022
path = "src/main.rs"
2123

2224
[lints]
23-
workspace = true
25+
workspace = true

crates/proc-macro-srv-cli/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
//! A standalone binary for `proc-macro-srv`.
22
//! Driver for proc macro server
3+
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
4+
#[cfg(feature = "in-rust-tree")]
5+
extern crate rustc_driver as _;
6+
37
use std::io;
48

59
fn main() -> std::io::Result<()> {

crates/proc-macro-srv/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ proc-macro-test.path = "./proc-macro-test"
3838

3939
[features]
4040
sysroot-abi = ["proc-macro-test/sysroot-abi"]
41+
in-rust-tree = ["mbe/in-rust-tree", "sysroot-abi"]
4142

4243
[lints]
43-
workspace = true
44+
workspace = true

crates/proc-macro-srv/src/lib.rs

Lines changed: 2 additions & 1 deletion
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(any(feature = "sysroot-abi", rust_analyzer))]
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)]
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;

crates/rust-analyzer/src/bin/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#![warn(rust_2018_idioms, unused_lifetimes)]
66
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
77
#[cfg(feature = "in-rust-tree")]
8-
#[allow(unused_extern_crates)]
9-
extern crate rustc_driver;
8+
extern crate rustc_driver as _;
109

1110
mod logger;
1211
mod rustc_wrapper;

0 commit comments

Comments
 (0)