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