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:
@@ -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
|
||||
}
|
||||
"#,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user