From 6356ea24dd026cc386dace23087cdbce7570f369 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 17 Mar 2021 16:31:54 +0100 Subject: Add test for `#[cfg]` on function params --- crates/hir_ty/src/diagnostics/expr.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crates/hir_ty/src') 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() { "#, ); } + + #[test] + fn cfgd_out_fn_params() { + check_diagnostics( + r#" +fn foo(#[cfg(NEVER)] x: ()) {} + +fn main() { + foo(); +} + "#, + ) + } } -- cgit v1.2.3