aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/privacy7.rs
blob: 00fa0ef8f11c74fa69465eb93bcfa6ec655b2462 (plain)
1
2
3
4
5
6
7
8
9
pub struct Foo(i8);
struct Bar(pub i8); // { dg-warning "struct is never constructed: .Bar." }
pub struct Baz {
    a: i32, // { dg-warning "field is never read: .a." }
    pub b: i32,
}

pub fn foo() {}
fn bar() {} // { dg-warning "function is never used: .bar." }