mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Support build.rs cargo:rustc-cfg
This commit is contained in:
parent
6a48a94d47
commit
2980ba1fde
4 changed files with 158 additions and 3 deletions
|
@ -399,6 +399,13 @@ impl ProjectWorkspace {
|
|||
let cfg_options = {
|
||||
let mut opts = default_cfg_options.clone();
|
||||
opts.insert_features(cargo[pkg].features.iter().map(Into::into));
|
||||
opts.insert_cfgs(
|
||||
cargo[pkg]
|
||||
.cfgs
|
||||
.iter()
|
||||
.filter_map(|c| c.to_str())
|
||||
.map(Into::into),
|
||||
);
|
||||
opts
|
||||
};
|
||||
let mut env = Env::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue