mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
Teach cargo about cfg(rust_analyzer)
This commit is contained in:
parent
a2aab001a7
commit
3a2ae6410d
4 changed files with 13 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ fn main() {
|
|||
println!("Creating {}", src_dir.display());
|
||||
std::fs::create_dir_all(src_dir).unwrap();
|
||||
|
||||
for item_els in [&["Cargo.toml"][..], &["src", "lib.rs"]] {
|
||||
for item_els in [&["Cargo.toml"][..], &["build.rs"][..], &["src", "lib.rs"]] {
|
||||
let mut src = imp_dir.clone();
|
||||
let mut dst = staging_dir.clone();
|
||||
for el in item_els {
|
||||
|
|
|
|||
5
crates/proc-macro-srv/proc-macro-test/imp/build.rs
Normal file
5
crates/proc-macro-srv/proc-macro-test/imp/build.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//! This teaches cargo about our cfg(rust_analyzer)
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rustc-check-cfg=cfg(rust_analyzer)");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue