mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
use slightly more idiomatic api for cfg
This commit is contained in:
parent
93199002af
commit
355419d404
7 changed files with 59 additions and 40 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue