diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_db/src/input.rs | 8 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index cd078e43a..3da28b435 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -111,8 +111,8 @@ pub struct CrateData { | |||
111 | /// This actual crate name can be different in a particular dependent crate | 111 | /// This actual crate name can be different in a particular dependent crate |
112 | /// or may even be missing for some cases, such as a dummy crate for the code snippet. | 112 | /// or may even be missing for some cases, such as a dummy crate for the code snippet. |
113 | pub display_name: Option<String>, | 113 | pub display_name: Option<String>, |
114 | cfg_options: CfgOptions, | 114 | pub cfg_options: CfgOptions, |
115 | env: Env, | 115 | pub env: Env, |
116 | pub dependencies: Vec<Dependency>, | 116 | pub dependencies: Vec<Dependency>, |
117 | } | 117 | } |
118 | 118 | ||
@@ -149,10 +149,6 @@ impl CrateGraph { | |||
149 | crate_id | 149 | crate_id |
150 | } | 150 | } |
151 | 151 | ||
152 | pub fn cfg_options(&self, crate_id: CrateId) -> &CfgOptions { | ||
153 | &self.arena[&crate_id].cfg_options | ||
154 | } | ||
155 | |||
156 | pub fn add_dep( | 152 | pub fn add_dep( |
157 | &mut self, | 153 | &mut self, |
158 | from: CrateId, | 154 | from: CrateId, |
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index bfa3db47a..d0459d9b0 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -51,7 +51,7 @@ pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> C | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | let cfg_options = crate_graph.cfg_options(def_map.krate); | 54 | let cfg_options = &crate_graph[def_map.krate].cfg_options; |
55 | 55 | ||
56 | let mut collector = DefCollector { | 56 | let mut collector = DefCollector { |
57 | db, | 57 | db, |