aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-18 00:30:11 +0000
committerGitHub <[email protected]>2021-03-18 00:30:11 +0000
commitbda858bba941fe7e629366072e34f2292494cc68 (patch)
tree4e7fef8aa9626ae753f281e19fd2c98c2b41a5a3 /crates/hir_ty
parent62c059ea74be10abe594d56daf9ee44480c06dfb (diff)
parent94b3b32c9882ad206df4f11f2f8de0be70a615f4 (diff)
Merge #8078
8078: Support `#[cfg]` on all associated items r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/tests/simple.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs
index f5069eba5..bcc43ed70 100644
--- a/crates/hir_ty/src/tests/simple.rs
+++ b/crates/hir_ty/src/tests/simple.rs
@@ -2545,3 +2545,22 @@ fn test() {
2545 "#]], 2545 "#]],
2546 ) 2546 )
2547} 2547}
2548
2549#[test]
2550fn cfgd_out_assoc_items() {
2551 check_types(
2552 r#"
2553struct S;
2554
2555impl S {
2556 #[cfg(FALSE)]
2557 const C: S = S;
2558}
2559
2560fn f() {
2561 S::C;
2562 //^^^^ {unknown}
2563}
2564 "#,
2565 )
2566}