Handle #[cfg] on call arguments

This commit is contained in:
Jonas Schievink 2021-03-17 15:08:46 +01:00
parent 0fbfab3b45
commit cb530e7c97
2 changed files with 40 additions and 12 deletions

View file

@ -690,4 +690,27 @@ fn main() {
"#,
)
}
#[test]
fn cfgd_out_call_arguments() {
check_diagnostics(
r#"
struct C(#[cfg(FALSE)] ());
impl C {
fn new() -> Self {
Self(
#[cfg(FALSE)]
(),
)
}
fn method(&self) {}
}
fn main() {
C::new().method(#[cfg(FALSE)] 0);
}
"#,
);
}
}