From d2ea776b8fbb5286a04dde75a9a8f8b14f12bfe9 Mon Sep 17 00:00:00 2001 From: uHOOCCOOHu Date: Mon, 30 Sep 2019 07:38:16 +0800 Subject: Enable CfgOptions `test` for workspace crates --- crates/ra_ide_api/src/parent_module.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/parent_module.rs') 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 { AnalysisChange, CrateGraph, Edition::Edition2018, }; + use ra_cfg::CfgOptions; #[test] fn test_resolve_parent_module() { @@ -88,7 +89,7 @@ mod tests { assert!(host.analysis().crate_for(mod_file).unwrap().is_empty()); let mut crate_graph = CrateGraph::default(); - let crate_id = crate_graph.add_crate_root(root_file, Edition2018); + let crate_id = crate_graph.add_crate_root(root_file, Edition2018, CfgOptions::default()); let mut change = AnalysisChange::new(); change.set_crate_graph(crate_graph); host.apply_change(change); -- cgit v1.2.3