Fallback to target in cfg if not specified in project json config

This commit is contained in:
Paul Daniel Faria 2020-07-04 13:50:27 -04:00
parent db99f2dd7e
commit 5b96d4103e

View file

@ -267,7 +267,7 @@ impl ProjectWorkspace {
.clone()
.map(|it| proc_macro_client.by_dylib_path(&it));
let target = krate.target.as_deref();
let target = krate.target.as_deref().or(target);
let target_cfgs = target_cfg_map
.entry(target.clone())
.or_insert_with(|| get_rustc_cfg_options(target.as_deref()));