summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/effective_visibilities_full_priv.rs
blob: a26ae3bd12264bbd1e5005d0bcc2e7e72becca7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(rustc_attrs)]
#![allow(private_in_public)]

struct SemiPriv;

mod m {
    #[rustc_effective_visibility]
    struct Priv;
    //~^ ERROR not in the table
    //~| ERROR not in the table

    #[rustc_effective_visibility]
    pub fn foo() {} //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)

    #[rustc_effective_visibility]
    impl crate::SemiPriv { //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
        pub fn f(_: Priv) {}
    }
}

fn main() {}