Skip to content

Commit 5b96d41

Browse files
committed
Fallback to target in cfg if not specified in project json config
1 parent db99f2d commit 5b96d41

File tree

1 file changed

+1
-1
lines changed
  • crates/ra_project_model/src

1 file changed

+1
-1
lines changed

crates/ra_project_model/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl ProjectWorkspace {
267267
.clone()
268268
.map(|it| proc_macro_client.by_dylib_path(&it));
269269

270-
let target = krate.target.as_deref();
270+
let target = krate.target.as_deref().or(target);
271271
let target_cfgs = target_cfg_map
272272
.entry(target.clone())
273273
.or_insert_with(|| get_rustc_cfg_options(target.as_deref()));

0 commit comments

Comments
 (0)