Add test for #[cfg] on function params

This commit is contained in:
Jonas Schievink 2021-03-17 16:31:54 +01:00
parent 622c780a8c
commit 6356ea24dd

View File

@ -713,4 +713,17 @@ fn main() {
"#,
);
}
#[test]
fn cfgd_out_fn_params() {
check_diagnostics(
r#"
fn foo(#[cfg(NEVER)] x: ()) {}
fn main() {
foo();
}
"#,
)
}
}