use slightly more idiomatic api for cfg
This commit is contained in:
@@ -43,8 +43,12 @@ pub fn load_cargo(root: &Path) -> Result<(AnalysisHost, FxHashMap<SourceRootId,
|
||||
);
|
||||
|
||||
// FIXME: cfg options?
|
||||
let default_cfg_options =
|
||||
get_rustc_cfg_options().atom("test".into()).atom("debug_assertion".into());
|
||||
let default_cfg_options = {
|
||||
let mut opts = get_rustc_cfg_options();
|
||||
opts.insert_atom("test".into());
|
||||
opts.insert_atom("debug_assertion".into());
|
||||
opts
|
||||
};
|
||||
|
||||
let (crate_graph, _crate_names) =
|
||||
ws.to_crate_graph(&default_cfg_options, &mut |path: &Path| {
|
||||
|
||||
Reference in New Issue
Block a user