aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-03-17 15:31:54 +0000
committerJonas Schievink <[email protected]>2021-03-17 17:28:27 +0000
commit6356ea24dd026cc386dace23087cdbce7570f369 (patch)
treeec13c1fc226705c1b109239ff70c332839a1ef7c
parent622c780a8ca023f09d57b4fa42608410c477128e (diff)
Add test for `#[cfg]` on function params
-rw-r--r--crates/hir_ty/src/diagnostics/expr.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs
index 50dc40335..9a3258955 100644
--- a/crates/hir_ty/src/diagnostics/expr.rs
+++ b/crates/hir_ty/src/diagnostics/expr.rs
@@ -713,4 +713,17 @@ fn main() {
713 "#, 713 "#,
714 ); 714 );
715 } 715 }
716
717 #[test]
718 fn cfgd_out_fn_params() {
719 check_diagnostics(
720 r#"
721fn foo(#[cfg(NEVER)] x: ()) {}
722
723fn main() {
724 foo();
725}
726 "#,
727 )
728 }
716} 729}