diff options
author | uHOOCCOOHu <[email protected]> | 2019-09-30 00:38:16 +0100 |
---|---|---|
committer | uHOOCCOOHu <[email protected]> | 2019-10-02 19:28:02 +0100 |
commit | d2ea776b8fbb5286a04dde75a9a8f8b14f12bfe9 (patch) | |
tree | d6ddac6dc88b327aaf956843dc53b3e635f699b9 /crates/ra_ide_api/src/parent_module.rs | |
parent | b1ed887d813bf5775a16624694939fdf836f97b1 (diff) |
Enable CfgOptions `test` for workspace crates
Diffstat (limited to 'crates/ra_ide_api/src/parent_module.rs')
-rw-r--r-- | crates/ra_ide_api/src/parent_module.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/parent_module.rs b/crates/ra_ide_api/src/parent_module.rs index c85f1d0d0..566509849 100644 --- a/crates/ra_ide_api/src/parent_module.rs +++ b/crates/ra_ide_api/src/parent_module.rs | |||
@@ -41,6 +41,7 @@ mod tests { | |||
41 | AnalysisChange, CrateGraph, | 41 | AnalysisChange, CrateGraph, |
42 | Edition::Edition2018, | 42 | Edition::Edition2018, |
43 | }; | 43 | }; |
44 | use ra_cfg::CfgOptions; | ||
44 | 45 | ||
45 | #[test] | 46 | #[test] |
46 | fn test_resolve_parent_module() { | 47 | fn test_resolve_parent_module() { |
@@ -88,7 +89,7 @@ mod tests { | |||
88 | assert!(host.analysis().crate_for(mod_file).unwrap().is_empty()); | 89 | assert!(host.analysis().crate_for(mod_file).unwrap().is_empty()); |
89 | 90 | ||
90 | let mut crate_graph = CrateGraph::default(); | 91 | let mut crate_graph = CrateGraph::default(); |
91 | let crate_id = crate_graph.add_crate_root(root_file, Edition2018); | 92 | let crate_id = crate_graph.add_crate_root(root_file, Edition2018, CfgOptions::default()); |
92 | let mut change = AnalysisChange::new(); | 93 | let mut change = AnalysisChange::new(); |
93 | change.set_crate_graph(crate_graph); | 94 | change.set_crate_graph(crate_graph); |
94 | host.apply_change(change); | 95 | host.apply_change(change); |