diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-13 17:20:16 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-13 17:20:16 +0000 |
commit | be7a31fbd64943f71afe11b0413c99496526dddc (patch) | |
tree | 746e40311f1fc9f351a088ec92434139c5207354 /crates/hir_def/src/nameres/tests | |
parent | 6ab405f2e9861c34ab9e1ad86af6604523745cef (diff) | |
parent | 1848bd0fa093a9fa00b0de98201abcfd574349f9 (diff) |
Merge #7999
7999: Handle `cfg_attr` gating multiple attributes r=jonas-schievink a=jonas-schievink
Apparently `#[cfg_attr(cfg_expr, attr1, attr2)]` is valid, so let's add support for that.
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r-- | crates/hir_def/src/nameres/tests/diagnostics.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index d5ef8ceb5..1b8e885b0 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs | |||
@@ -149,6 +149,9 @@ fn inactive_via_cfg_attr() { | |||
149 | #[cfg_attr(not(never), cfg(not(no)))] fn f() {} | 149 | #[cfg_attr(not(never), cfg(not(no)))] fn f() {} |
150 | 150 | ||
151 | #[cfg_attr(never, cfg(no))] fn g() {} | 151 | #[cfg_attr(never, cfg(no))] fn g() {} |
152 | |||
153 | #[cfg_attr(not(never), inline, cfg(no))] fn h() {} | ||
154 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ code is inactive due to #[cfg] directives: no is disabled | ||
152 | "#, | 155 | "#, |
153 | ); | 156 | ); |
154 | } | 157 | } |