]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/restricted/relative-2018.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / privacy / restricted / relative-2018.rs
1 // edition:2018
2
3 mod m {
4 pub(in crate) struct S1; // OK
5 pub(in super) struct S2; // OK
6 pub(in self) struct S3; // OK
7 pub(in ::core) struct S4;
8 //~^ ERROR visibilities can only be restricted to ancestor modules
9 pub(in a::b) struct S5;
10 //~^ ERROR relative paths are not supported in visibilities in 2018 edition or later
11 }
12
13 fn main() {}