diff options
Diffstat (limited to 'crates/ra_hir/src/impl_block.rs')
-rw-r--r-- | crates/ra_hir/src/impl_block.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index 7877c3171..55dfc393b 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -213,7 +213,9 @@ impl ModuleImplBlocks { | |||
213 | match item { | 213 | match item { |
214 | ast::ItemOrMacro::Item(ast::ModuleItem::ImplBlock(impl_block_ast)) => { | 214 | ast::ItemOrMacro::Item(ast::ModuleItem::ImplBlock(impl_block_ast)) => { |
215 | let attrs = Attr::from_attrs_owner(file_id, &impl_block_ast, db); | 215 | let attrs = Attr::from_attrs_owner(file_id, &impl_block_ast, db); |
216 | if attrs.iter().any(|attr| attr.is_cfg_enabled(cfg_options) == Some(false)) { | 216 | if attrs.map_or(false, |attrs| { |
217 | attrs.iter().any(|attr| attr.is_cfg_enabled(cfg_options) == Some(false)) | ||
218 | }) { | ||
217 | continue; | 219 | continue; |
218 | } | 220 | } |
219 | 221 | ||
@@ -228,7 +230,9 @@ impl ModuleImplBlocks { | |||
228 | ast::ItemOrMacro::Item(_) => (), | 230 | ast::ItemOrMacro::Item(_) => (), |
229 | ast::ItemOrMacro::Macro(macro_call) => { | 231 | ast::ItemOrMacro::Macro(macro_call) => { |
230 | let attrs = Attr::from_attrs_owner(file_id, ¯o_call, db); | 232 | let attrs = Attr::from_attrs_owner(file_id, ¯o_call, db); |
231 | if attrs.iter().any(|attr| attr.is_cfg_enabled(cfg_options) == Some(false)) { | 233 | if attrs.map_or(false, |attrs| { |
234 | attrs.iter().any(|attr| attr.is_cfg_enabled(cfg_options) == Some(false)) | ||
235 | }) { | ||
232 | continue; | 236 | continue; |
233 | } | 237 | } |
234 | 238 | ||