aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-12-17 23:23:46 +0000
committerJonas Schievink <[email protected]>2020-12-18 01:24:14 +0000
commit4f07d8dd587c24bca8622ee8c39e5a1e156825b4 (patch)
treed60fc981c2dcc2fe5b78d73ac419c65a5574d027 /crates/hir_def/src/body
parenta4e17a5a96d3a8c15c91e90adce9d9b8cdc48a46 (diff)
Refactor attributes API to allow handling cfg_attr
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/lower.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs
index 3b3d74987..0f404be1b 100644
--- a/crates/hir_def/src/body/lower.rs
+++ b/crates/hir_def/src/body/lower.rs
@@ -963,7 +963,7 @@ impl ExprCollector<'_> {
963 /// Returns `None` (and emits diagnostics) when `owner` if `#[cfg]`d out, and `Some(())` when 963 /// Returns `None` (and emits diagnostics) when `owner` if `#[cfg]`d out, and `Some(())` when
964 /// not. 964 /// not.
965 fn check_cfg(&mut self, owner: &dyn ast::AttrsOwner) -> Option<()> { 965 fn check_cfg(&mut self, owner: &dyn ast::AttrsOwner) -> Option<()> {
966 match self.expander.parse_attrs(owner).cfg() { 966 match self.expander.parse_attrs(self.db, owner).cfg() {
967 Some(cfg) => { 967 Some(cfg) => {
968 if self.expander.cfg_options().check(&cfg) != Some(false) { 968 if self.expander.cfg_options().check(&cfg) != Some(false) {
969 return Some(()); 969 return Some(());