summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/useless-pub.rs
blob: e4b671142f9f0250355d484fcd6d085c0d612a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
struct A { pub i: isize }

pub trait E {
    fn foo(&self);
}

impl E for A {
    pub fn foo(&self) {} //~ ERROR: visibility qualifiers are not permitted here
}

enum Foo {
    V1 { pub f: i32 }, //~ ERROR visibility qualifiers are not permitted here
    V2(pub i32), //~ ERROR visibility qualifiers are not permitted here
}

fn main() {}