aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/attr.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-12-18 19:25:41 +0000
committerJonas Schievink <[email protected]>2020-12-18 19:25:41 +0000
commitaab9cc9cfb64aea659f2f9b588e8a4f392e2c4e1 (patch)
tree1fe215b8433ea21ea713567dfc7a3b2210a55541 /crates/hir_def/src/attr.rs
parent382ee2fa037a3ec293d332dd70f04975396b5513 (diff)
Hit a mark
Diffstat (limited to 'crates/hir_def/src/attr.rs')
-rw-r--r--crates/hir_def/src/attr.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_def/src/attr.rs b/crates/hir_def/src/attr.rs
index 68d05c54d..1b9c64ee5 100644
--- a/crates/hir_def/src/attr.rs
+++ b/crates/hir_def/src/attr.rs
@@ -12,6 +12,7 @@ use syntax::{
12 ast::{self, AstNode, AttrsOwner}, 12 ast::{self, AstNode, AttrsOwner},
13 match_ast, AstToken, SmolStr, SyntaxNode, 13 match_ast, AstToken, SmolStr, SyntaxNode,
14}; 14};
15use test_utils::mark;
15use tt::Subtree; 16use tt::Subtree;
16 17
17use crate::{ 18use crate::{
@@ -175,6 +176,8 @@ impl RawAttrs {
175 if cfg_options.check(&cfg) == Some(false) { 176 if cfg_options.check(&cfg) == Some(false) {
176 None 177 None
177 } else { 178 } else {
179 mark::hit!(cfg_attr_active);
180
178 let attr = ast::Attr::parse(&format!("#[{}]", attr)).ok()?; 181 let attr = ast::Attr::parse(&format!("#[{}]", attr)).ok()?;
179 let hygiene = Hygiene::new_unhygienic(); // FIXME 182 let hygiene = Hygiene::new_unhygienic(); // FIXME
180 Attr::from_src(attr, &hygiene) 183 Attr::from_src(attr, &hygiene)