From a49ad47e5afa5950f92b77badc6679295101328a Mon Sep 17 00:00:00 2001 From: uHOOCCOOHu Date: Mon, 30 Sep 2019 17:47:17 +0800 Subject: Support cfg attribute on impl blocks --- crates/ra_hir/src/nameres/raw.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/ra_hir/src/nameres/raw.rs') diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index ff079bcf1..f02d4eb7a 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs @@ -411,9 +411,7 @@ impl RawItemsCollector<&DB> { } fn parse_attrs(&self, item: &impl ast::AttrsOwner) -> Arc<[Attr]> { - item.attrs() - .flat_map(|ast| Attr::from_src(Source { ast, file_id: self.file_id }, self.db)) - .collect() + Attr::from_attrs_owner(self.file_id, item, self.db) } } -- cgit v1.2.3