aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-11 16:20:26 +0100
committerAleksey Kladov <[email protected]>2020-04-11 16:20:26 +0100
commitdeb40d52aaa1989402fc01d65da389dc92fb66fa (patch)
tree0467c3d574da65b3e112c1f579cc2c6506b6ec0f /crates
parent55356332bfd22db159fef044b9e611b5b82b417c (diff)
Align naming
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir_def/src/adt.rs4
-rw-r--r--crates/ra_hir_def/src/body.rs2
-rw-r--r--crates/ra_hir_def/src/body/lower.rs3
-rw-r--r--crates/ra_hir_def/src/data.rs2
4 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index 2619d106d..c7c3c0bc7 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -202,7 +202,7 @@ fn lower_struct(
202 ast::StructKind::Tuple(fl) => { 202 ast::StructKind::Tuple(fl) => {
203 for (i, fd) in fl.fields().enumerate() { 203 for (i, fd) in fl.fields().enumerate() {
204 let attrs = expander.parse_attrs(&fd); 204 let attrs = expander.parse_attrs(&fd);
205 if !expander.check_cfg(&attrs) { 205 if !expander.is_cfg_enabled(&attrs) {
206 continue; 206 continue;
207 } 207 }
208 208
@@ -220,7 +220,7 @@ fn lower_struct(
220 ast::StructKind::Record(fl) => { 220 ast::StructKind::Record(fl) => {
221 for fd in fl.fields() { 221 for fd in fl.fields() {
222 let attrs = expander.parse_attrs(&fd); 222 let attrs = expander.parse_attrs(&fd);
223 if !expander.check_cfg(&attrs) { 223 if !expander.is_cfg_enabled(&attrs) {
224 continue; 224 continue;
225 } 225 }
226 226
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs
index 48b797dd6..7fe5403c0 100644
--- a/crates/ra_hir_def/src/body.rs
+++ b/crates/ra_hir_def/src/body.rs
@@ -118,7 +118,7 @@ impl Expander {
118 Attrs::new(owner, &self.hygiene) 118 Attrs::new(owner, &self.hygiene)
119 } 119 }
120 120
121 pub(crate) fn check_cfg(&self, attrs: &Attrs) -> bool { 121 pub(crate) fn is_cfg_enabled(&self, attrs: &Attrs) -> bool {
122 attrs.is_cfg_enabled(&self.cfg_options) 122 attrs.is_cfg_enabled(&self.cfg_options)
123 } 123 }
124 124
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 6f56d3d7a..c1d7eb826 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -306,8 +306,7 @@ impl ExprCollector<'_> {
306 .inspect(|field| field_ptrs.push(AstPtr::new(field))) 306 .inspect(|field| field_ptrs.push(AstPtr::new(field)))
307 .filter_map(|field| { 307 .filter_map(|field| {
308 let attrs = self.expander.parse_attrs(&field); 308 let attrs = self.expander.parse_attrs(&field);
309 309 if !self.expander.is_cfg_enabled(&attrs) {
310 if !self.expander.check_cfg(&attrs) {
311 return None; 310 return None;
312 } 311 }
313 312
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 446af9d9b..56a20c5bd 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -337,7 +337,7 @@ fn collect_impl_items(
337 .filter_map(|item_node| match item_node { 337 .filter_map(|item_node| match item_node {
338 ast::ImplItem::FnDef(it) => { 338 ast::ImplItem::FnDef(it) => {
339 let attrs = expander.parse_attrs(&it); 339 let attrs = expander.parse_attrs(&it);
340 if !expander.check_cfg(&attrs) { 340 if !expander.is_cfg_enabled(&attrs) {
341 return None; 341 return None;
342 } 342 }
343 let def = FunctionLoc { 343 let def = FunctionLoc {