Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ca957f4

Browse files
committed
Fix proc-macro-test-impl building without any proc-macros
1 parent 9197b54 commit ca957f4

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

Cargo.lock

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ doctest = false
1212
[build-dependencies]
1313
cargo_metadata = "0.18.1"
1414

15-
proc-macro-test-impl = { path = "imp", version = "0.0.0" }
16-
1715
# local deps
18-
toolchain.path = "../../toolchain"
16+
toolchain = { path = "../../toolchain", version = "0.0.0" }
1917

2018
[features]
21-
sysroot-abi = ["proc-macro-test-impl/sysroot-abi"]
19+
sysroot-abi = []

crates/proc-macro-srv/proc-macro-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ fn main() {
7070
// instance to use the same target directory.
7171
.arg("--target-dir")
7272
.arg(&target_dir);
73+
if cfg!(feature = "sysroot-abi") {
74+
cmd.args(["--features", "sysroot-abi"]);
75+
}
7376

7477
if let Ok(target) = std::env::var("TARGET") {
7578
cmd.args(["--target", &target]);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl ProcMacros {
9797
}
9898
}
9999

100-
Err(bridge::PanicMessage::String("Nothing to expand".to_string()).into())
100+
Err(bridge::PanicMessage::String(format!("proc-macro `{macro_name}` is missing")).into())
101101
}
102102

103103
pub(crate) fn list_macros(&self) -> Vec<(String, ProcMacroKind)> {

0 commit comments

Comments
 (0)