mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Auto merge of #12965 - DesmondWillowbrook:assoc-method-dimming, r=Veykril
feat: make trait assoc items become inactive due to cfg fixes #12394
This commit is contained in:
commit
dea163970a
5 changed files with 74 additions and 21 deletions
|
@ -106,18 +106,17 @@ fn f() {
|
|||
|
||||
#[test]
|
||||
fn inactive_assoc_item() {
|
||||
// FIXME these currently don't work, hence the *
|
||||
check(
|
||||
r#"
|
||||
struct Foo;
|
||||
impl Foo {
|
||||
#[cfg(any())] pub fn f() {}
|
||||
//*************************** weak: code is inactive due to #[cfg] directives
|
||||
//^^^^^^^^^^^^^^^^^^^^^^^^^^^ weak: code is inactive due to #[cfg] directives
|
||||
}
|
||||
|
||||
trait Bar {
|
||||
#[cfg(any())] pub fn f() {}
|
||||
//*************************** weak: code is inactive due to #[cfg] directives
|
||||
//^^^^^^^^^^^^^^^^^^^^^^^^^^^ weak: code is inactive due to #[cfg] directives
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue