mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Fix proc-macro-test-impl building without any proc-macros
This commit is contained in:
parent
9197b541c2
commit
ca957f4f82
4 changed files with 6 additions and 10 deletions
5
Cargo.lock
generated
5
Cargo.lock
generated
|
@ -1304,14 +1304,9 @@ name = "proc-macro-test"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"cargo_metadata",
|
||||
"proc-macro-test-impl",
|
||||
"toolchain",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-test-impl"
|
||||
version = "0.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.69"
|
||||
|
|
|
@ -12,10 +12,8 @@ doctest = false
|
|||
[build-dependencies]
|
||||
cargo_metadata = "0.18.1"
|
||||
|
||||
proc-macro-test-impl = { path = "imp", version = "0.0.0" }
|
||||
|
||||
# local deps
|
||||
toolchain.path = "../../toolchain"
|
||||
toolchain = { path = "../../toolchain", version = "0.0.0" }
|
||||
|
||||
[features]
|
||||
sysroot-abi = ["proc-macro-test-impl/sysroot-abi"]
|
||||
sysroot-abi = []
|
||||
|
|
|
@ -70,6 +70,9 @@ fn main() {
|
|||
// instance to use the same target directory.
|
||||
.arg("--target-dir")
|
||||
.arg(&target_dir);
|
||||
if cfg!(feature = "sysroot-abi") {
|
||||
cmd.args(["--features", "sysroot-abi"]);
|
||||
}
|
||||
|
||||
if let Ok(target) = std::env::var("TARGET") {
|
||||
cmd.args(["--target", &target]);
|
||||
|
|
|
@ -97,7 +97,7 @@ impl ProcMacros {
|
|||
}
|
||||
}
|
||||
|
||||
Err(bridge::PanicMessage::String("Nothing to expand".to_string()).into())
|
||||
Err(bridge::PanicMessage::String(format!("proc-macro `{macro_name}` is missing")).into())
|
||||
}
|
||||
|
||||
pub(crate) fn list_macros(&self) -> Vec<(String, ProcMacroKind)> {
|
||||
|
|
Loading…
Reference in a new issue