1 2 3 4 5 6 7 8 9 10 11 12
// { dg-additional-options "-w -frust-cfg=A" } struct Foo; impl Foo { #[cfg(not(A))] fn test(&self) {} } fn main() { let a = Foo; a.test(); // { dg-error "no method named .test. found in the current scope" "" { target *-*-* } .-1 } }