mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
Add test for #[cfg] on function params
This commit is contained in:
@@ -713,4 +713,17 @@ fn main() {
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cfgd_out_fn_params() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
fn foo(#[cfg(NEVER)] x: ()) {}
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user