Skip to content

Commit aab9cc9

Browse files
Hit a mark
1 parent 382ee2f commit aab9cc9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

crates/hir_def/src/attr.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use syntax::{
1212
ast::{self, AstNode, AttrsOwner},
1313
match_ast, AstToken, SmolStr, SyntaxNode,
1414
};
15+
use test_utils::mark;
1516
use tt::Subtree;
1617

1718
use crate::{
@@ -175,6 +176,8 @@ impl RawAttrs {
175176
if cfg_options.check(&cfg) == Some(false) {
176177
None
177178
} else {
179+
mark::hit!(cfg_attr_active);
180+
178181
let attr = ast::Attr::parse(&format!("#[{}]", attr)).ok()?;
179182
let hygiene = Hygiene::new_unhygienic(); // FIXME
180183
Attr::from_src(attr, &hygiene)

crates/hir_def/src/nameres/tests/diagnostics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use base_db::fixture::WithFixture;
2+
use test_utils::mark;
23

34
use crate::test_db::TestDB;
45

@@ -123,6 +124,7 @@ fn inactive_item() {
123124
/// Tests that `cfg` attributes behind `cfg_attr` is handled properly.
124125
#[test]
125126
fn inactive_via_cfg_attr() {
127+
mark::check!(cfg_attr_active);
126128
check_diagnostics(
127129
r#"
128130
//- /lib.rs

0 commit comments

Comments
 (0)