From 6ea7c319154f9ec10721f4041afc9d07d6b2476b Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Wed, 11 Mar 2020 11:04:02 +0800 Subject: Add extern source --- crates/ra_ide/src/lib.rs | 1 + crates/ra_ide/src/mock_analysis.rs | 2 ++ crates/ra_ide/src/parent_module.rs | 1 + 3 files changed, 4 insertions(+) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index c60e86aea..39981ed3b 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -217,6 +217,7 @@ impl Analysis { None, cfg_options, Env::default(), + Default::default(), ); change.add_file(source_root, file_id, "main.rs".into(), Arc::new(text)); change.set_crate_graph(crate_graph); diff --git a/crates/ra_ide/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs index 90f84b052..25816cf6f 100644 --- a/crates/ra_ide/src/mock_analysis.rs +++ b/crates/ra_ide/src/mock_analysis.rs @@ -102,6 +102,7 @@ impl MockAnalysis { None, cfg_options, Env::default(), + Default::default(), )); } else if path.ends_with("/lib.rs") { let crate_name = path.parent().unwrap().file_name().unwrap(); @@ -111,6 +112,7 @@ impl MockAnalysis { Some(crate_name.to_owned()), cfg_options, Env::default(), + Default::default(), ); if let Some(root_crate) = root_crate { crate_graph diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs index b73cefd97..76d130b9b 100644 --- a/crates/ra_ide/src/parent_module.rs +++ b/crates/ra_ide/src/parent_module.rs @@ -136,6 +136,7 @@ mod tests { None, CfgOptions::default(), Env::default(), + Default::default(), ); let mut change = AnalysisChange::new(); change.set_crate_graph(crate_graph); -- cgit v1.2.3