mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Handle #[cfg]
on call arguments
This commit is contained in:
parent
0fbfab3b45
commit
cb530e7c97
2 changed files with 40 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue