From 55356332bfd22db159fef044b9e611b5b82b417c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Apr 2020 17:18:42 +0200 Subject: Remove code duplication --- crates/ra_hir_def/src/nameres/collector.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crates/ra_hir_def/src/nameres') diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 8fe3f8617..1c33a6520 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -977,11 +977,7 @@ impl ModCollector<'_, '_> { } fn is_cfg_enabled(&self, attrs: &Attrs) -> bool { - // FIXME: handle cfg_attr :-) - attrs - .by_key("cfg") - .tt_values() - .all(|tt| self.def_collector.cfg_options.is_cfg_enabled(tt) != Some(false)) + attrs.is_cfg_enabled(self.def_collector.cfg_options) } } -- cgit v1.2.3