use slightly more idiomatic api for cfg

This commit is contained in:
Aleksey Kladov 2019-10-08 14:22:49 +03:00
parent 93199002af
commit 355419d404
7 changed files with 59 additions and 40 deletions

View file

@ -98,8 +98,12 @@ impl WorldState {
}
// FIXME: Read default cfgs from config
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
};
// Create crate graph from all the workspaces
let mut crate_graph = CrateGraph::default();