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:
bors 2022-08-22 07:20:56 +00:00
commit dea163970a
5 changed files with 74 additions and 21 deletions

View file

@ -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
}
"#,
);