about summary refs log tree commit diff
path: root/tests/ui/privacy/restricted/relative-2018.rs
blob: e4f290dec4ac632f2eecc9c4457343f1da2b3c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ edition:2018

mod m {
    pub(in crate) struct S1; // OK
    pub(in super) struct S2; // OK
    pub(in self) struct S3; // OK
    pub(in ::core) struct S4;
    //~^ ERROR visibilities can only be restricted to ancestor modules
    pub(in a::b) struct S5;
    //~^ ERROR relative paths are not supported in visibilities in 2018 edition or later
}

fn main() {}