]> git.proxmox.com Git - rustc.git/blob - src/test/ui/pub/pub-restricted.stderr
New upstream version 1.19.0+dfsg1
[rustc.git] / src / test / ui / pub / pub-restricted.stderr
1 error: incorrect visibility restriction
2 --> $DIR/pub-restricted.rs:15:6
3 |
4 15 | pub (a) fn afn() {}
5 | ^ help: make this visible only to module `a` with `in`: `in a`
6 |
7 = help: some possible visibility restrictions are:
8 `pub(crate)`: visible only on the current crate
9 `pub(super)`: visible only in the current module's parent
10 `pub(in path::to::module)`: visible only on the specified path
11
12 error: incorrect visibility restriction
13 --> $DIR/pub-restricted.rs:16:6
14 |
15 16 | pub (b) fn bfn() {}
16 | ^ help: make this visible only to module `b` with `in`: `in b`
17 |
18 = help: some possible visibility restrictions are:
19 `pub(crate)`: visible only on the current crate
20 `pub(super)`: visible only in the current module's parent
21 `pub(in path::to::module)`: visible only on the specified path
22
23 error: incorrect visibility restriction
24 --> $DIR/pub-restricted.rs:32:14
25 |
26 32 | pub (a) invalid: usize,
27 | ^ help: make this visible only to module `a` with `in`: `in a`
28 |
29 = help: some possible visibility restrictions are:
30 `pub(crate)`: visible only on the current crate
31 `pub(super)`: visible only in the current module's parent
32 `pub(in path::to::module)`: visible only on the specified path
33
34 error: incorrect visibility restriction
35 --> $DIR/pub-restricted.rs:41:6
36 |
37 41 | pub (xyz) fn xyz() {}
38 | ^^^ help: make this visible only to module `xyz` with `in`: `in xyz`
39 |
40 = help: some possible visibility restrictions are:
41 `pub(crate)`: visible only on the current crate
42 `pub(super)`: visible only in the current module's parent
43 `pub(in path::to::module)`: visible only on the specified path
44
45 error: visibilities can only be restricted to ancestor modules
46 --> $DIR/pub-restricted.rs:33:17
47 |
48 33 | pub (in x) non_parent_invalid: usize,
49 | ^
50
51 error: aborting due to previous error(s)
52