aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/cfg2.rs
blob: ce1c5f96369a23b65badfe1d87c2a9aec8a5c417 (plain)
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 }
}