aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/cfg2.rs
blob: 939384c5b7dab383d0da44d4e824d8571dc76d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { 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 "failed to resolve method for .test." "" { target *-*-* } .-1 }
    // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 }
}