]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/restricted/test.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / privacy / restricted / test.stderr
1 error[E0433]: failed to resolve: maybe a missing crate `bad`?
2 --> $DIR/test.rs:50:12
3 |
4 LL | pub(in bad::path) mod m1 {}
5 | ^^^ maybe a missing crate `bad`?
6
7 error[E0742]: visibilities can only be restricted to ancestor modules
8 --> $DIR/test.rs:51:12
9 |
10 LL | pub(in foo) mod m2 {}
11 | ^^^
12
13 error[E0364]: `f` is private, and cannot be re-exported
14 --> $DIR/test.rs:21:24
15 |
16 LL | pub(super) use foo::bar::f as g;
17 | ^^^^^^^^^^^^^^^^
18 |
19 note: consider marking `f` as `pub` in the imported module
20 --> $DIR/test.rs:21:24
21 |
22 LL | pub(super) use foo::bar::f as g;
23 | ^^^^^^^^^^^^^^^^
24
25 error[E0603]: struct `Crate` is private
26 --> $DIR/test.rs:38:25
27 |
28 LL | use pub_restricted::Crate;
29 | ^^^^^ private struct
30 |
31 note: the struct `Crate` is defined here
32 --> $DIR/auxiliary/pub_restricted.rs:3:1
33 |
34 LL | pub(crate) struct Crate;
35 | ^^^^^^^^^^^^^^^^^^^^^^^^
36
37 error[E0603]: function `f` is private
38 --> $DIR/test.rs:30:19
39 |
40 LL | use foo::bar::f;
41 | ^ private function
42 |
43 note: the function `f` is defined here
44 --> $DIR/test.rs:8:9
45 |
46 LL | pub(super) fn f() {}
47 | ^^^^^^^^^^^^^^^^^
48
49 error[E0616]: field `x` of struct `S` is private
50 --> $DIR/test.rs:31:18
51 |
52 LL | S::default().x;
53 | ^ private field
54
55 error[E0624]: associated function `f` is private
56 --> $DIR/test.rs:32:18
57 |
58 LL | pub(super) fn f(&self) {}
59 | ---------------------- private associated function defined here
60 ...
61 LL | S::default().f();
62 | ^ private associated function
63
64 error[E0624]: associated function `g` is private
65 --> $DIR/test.rs:33:8
66 |
67 LL | pub(super) fn g() {}
68 | ----------------- private associated function defined here
69 ...
70 LL | S::g();
71 | ^ private associated function
72
73 error[E0616]: field `y` of struct `Universe` is private
74 --> $DIR/test.rs:42:15
75 |
76 LL | let _ = u.y;
77 | ^ private field
78
79 error[E0616]: field `z` of struct `Universe` is private
80 --> $DIR/test.rs:43:15
81 |
82 LL | let _ = u.z;
83 | ^ private field
84
85 error[E0624]: associated function `g` is private
86 --> $DIR/test.rs:45:7
87 |
88 LL | u.g();
89 | ^ private associated function
90 |
91 ::: $DIR/auxiliary/pub_restricted.rs:14:5
92 |
93 LL | pub(crate) fn g(&self) {}
94 | ---------------------- private associated function defined here
95
96 error[E0624]: associated function `h` is private
97 --> $DIR/test.rs:46:7
98 |
99 LL | u.h();
100 | ^ private associated function
101 |
102 ::: $DIR/auxiliary/pub_restricted.rs:15:5
103 |
104 LL | crate fn h(&self) {}
105 | ----------------- private associated function defined here
106
107 error: aborting due to 12 previous errors
108
109 Some errors have detailed explanations: E0364, E0433, E0603, E0616, E0624, E0742.
110 For more information about an error, try `rustc --explain E0364`.