mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Support #[cfg]
on all associated items
This commit is contained in:
parent
62c059ea74
commit
94b3b32c98
2 changed files with 24 additions and 5 deletions
|
@ -2545,3 +2545,22 @@ fn test() {
|
|||
"#]],
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cfgd_out_assoc_items() {
|
||||
check_types(
|
||||
r#"
|
||||
struct S;
|
||||
|
||||
impl S {
|
||||
#[cfg(FALSE)]
|
||||
const C: S = S;
|
||||
}
|
||||
|
||||
fn f() {
|
||||
S::C;
|
||||
//^^^^ {unknown}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue