]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/private-inferred-type.stderr
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / privacy / private-inferred-type.stderr
1 error[E0446]: private type `m::Priv` in public interface
2   --> $DIR/private-inferred-type.rs:61:36
3    |
4 LL |     struct Priv;
5    |     - `m::Priv` declared as private
6 ...
7 LL |     impl TraitWithAssocTy for u8 { type AssocTy = Priv; }
8    |                                    ^^^^^^^^^^^^^^^^^^^^ can't leak private type
9
10 error[E0446]: private type `adjust::S2` in public interface
11   --> $DIR/private-inferred-type.rs:83:9
12    |
13 LL |     struct S2;
14    |     - `adjust::S2` declared as private
15 ...
16 LL |         type Target = S2Alias;
17    |         ^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
18
19 error: type `m::Priv` is private
20   --> $DIR/private-inferred-type.rs:97:9
21    |
22 LL |     let _: m::Alias;
23    |         ^ private type
24
25 error: type `m::Priv` is private
26   --> $DIR/private-inferred-type.rs:97:12
27    |
28 LL |     let _: m::Alias;
29    |            ^^^^^^^^ private type
30
31 error: type `m::Priv` is private
32   --> $DIR/private-inferred-type.rs:99:13
33    |
34 LL |     let _: <m::Alias as m::TraitWithAssocTy>::AssocTy;
35    |             ^^^^^^^^ private type
36
37 error: type `m::Priv` is private
38   --> $DIR/private-inferred-type.rs:100:5
39    |
40 LL |     m::Alias {};
41    |     ^^^^^^^^^^^ private type
42
43 error: type `m::Priv` is private
44   --> $DIR/private-inferred-type.rs:101:5
45    |
46 LL |     m::Pub { 0: m::Alias {} };
47    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
48
49 error: type `m::Priv` is private
50   --> $DIR/private-inferred-type.rs:103:5
51    |
52 LL |     m::Pub::static_method;
53    |     ^^^^^^^^^^^^^^^^^^^^^ private type
54
55 error: type `m::Priv` is private
56   --> $DIR/private-inferred-type.rs:104:5
57    |
58 LL |     m::Pub::INHERENT_ASSOC_CONST;
59    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
60
61 error: type `m::Priv` is private
62   --> $DIR/private-inferred-type.rs:105:5
63    |
64 LL |     m::Pub(0u8).method_with_substs::<m::Alias>();
65    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
66
67 error: type `m::Priv` is private
68   --> $DIR/private-inferred-type.rs:106:17
69    |
70 LL |     m::Pub(0u8).method_with_priv_params(loop{});
71    |                 ^^^^^^^^^^^^^^^^^^^^^^^ private type
72
73 error: type `m::Priv` is private
74   --> $DIR/private-inferred-type.rs:107:5
75    |
76 LL |     <m::Alias as m::TraitWithAssocConst>::TRAIT_ASSOC_CONST;
77    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
78
79 error: type `m::Priv` is private
80   --> $DIR/private-inferred-type.rs:108:6
81    |
82 LL |     <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST;
83    |      ^^^^^^^^^^^^^^^^ private type
84
85 error: type `m::Priv` is private
86   --> $DIR/private-inferred-type.rs:109:5
87    |
88 LL |     <m::Pub<m::Alias>>::INHERENT_ASSOC_CONST_GENERIC_SELF;
89    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
90
91 error: type `m::Priv` is private
92   --> $DIR/private-inferred-type.rs:110:5
93    |
94 LL |     <m::Pub<m::Alias>>::static_method_generic_self;
95    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ private type
96
97 error: type `m::Priv` is private
98   --> $DIR/private-inferred-type.rs:112:5
99    |
100 LL |     u8::pub_method;
101    |     ^^^^^^^^^^^^^^ private type
102
103 error: type `adjust::S2` is private
104   --> $DIR/private-inferred-type.rs:114:5
105    |
106 LL |     adjust::S1.method_s3();
107    |     ^^^^^^^^^^ private type
108
109 error: type `fn() {m::priv_fn}` is private
110   --> $DIR/private-inferred-type.rs:39:9
111    |
112 LL |         priv_fn;
113    |         ^^^^^^^ private type
114 ...
115 LL |     m::m!();
116    |     -------- in this macro invocation
117    |
118    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
119
120 error: type `m::PrivEnum` is private
121   --> $DIR/private-inferred-type.rs:41:9
122    |
123 LL |         PrivEnum::Variant;
124    |         ^^^^^^^^^^^^^^^^^ private type
125 ...
126 LL |     m::m!();
127    |     -------- in this macro invocation
128    |
129    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
130
131 error: type `fn() {<u8 as m::PrivTrait>::method}` is private
132   --> $DIR/private-inferred-type.rs:43:9
133    |
134 LL |         <u8 as PrivTrait>::method;
135    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ private type
136 ...
137 LL |     m::m!();
138    |     -------- in this macro invocation
139    |
140    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
141
142 error: type `fn(u8) -> m::PrivTupleStruct {m::PrivTupleStruct}` is private
143   --> $DIR/private-inferred-type.rs:45:9
144    |
145 LL |         PrivTupleStruct;
146    |         ^^^^^^^^^^^^^^^ private type
147 ...
148 LL |     m::m!();
149    |     -------- in this macro invocation
150    |
151    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
152
153 error: type `fn(u8) -> m::PubTupleStruct {m::PubTupleStruct}` is private
154   --> $DIR/private-inferred-type.rs:47:9
155    |
156 LL |         PubTupleStruct;
157    |         ^^^^^^^^^^^^^^ private type
158 ...
159 LL |     m::m!();
160    |     -------- in this macro invocation
161    |
162    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
163
164 error: type `for<'r> fn(&'r m::Pub<u8>) {m::Pub::<u8>::priv_method}` is private
165   --> $DIR/private-inferred-type.rs:49:18
166    |
167 LL |         Pub(0u8).priv_method();
168    |                  ^^^^^^^^^^^ private type
169 ...
170 LL |     m::m!();
171    |     -------- in this macro invocation
172    |
173    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
174
175 error: trait `m::Trait` is private
176   --> $DIR/private-inferred-type.rs:118:5
177    |
178 LL |     m::leak_anon1();
179    |     ^^^^^^^^^^^^^^^ private trait
180
181 error: type `m::Priv` is private
182   --> $DIR/private-inferred-type.rs:119:5
183    |
184 LL |     m::leak_anon2();
185    |     ^^^^^^^^^^^^^^^ private type
186
187 error: type `m::Priv` is private
188   --> $DIR/private-inferred-type.rs:120:5
189    |
190 LL |     m::leak_anon3();
191    |     ^^^^^^^^^^^^^^^ private type
192
193 error: trait `m::Trait` is private
194   --> $DIR/private-inferred-type.rs:122:5
195    |
196 LL |     m::leak_dyn1();
197    |     ^^^^^^^^^^^^^^ private trait
198
199 error: type `m::Priv` is private
200   --> $DIR/private-inferred-type.rs:123:5
201    |
202 LL |     m::leak_dyn2();
203    |     ^^^^^^^^^^^^^^ private type
204
205 error: type `m::Priv` is private
206   --> $DIR/private-inferred-type.rs:124:5
207    |
208 LL |     m::leak_dyn3();
209    |     ^^^^^^^^^^^^^^ private type
210
211 error: type `m::Priv` is private
212   --> $DIR/private-inferred-type.rs:127:13
213    |
214 LL |     let a = m::Alias {};
215    |             ^^^^^^^^^^^ private type
216
217 error: type `m::Priv` is private
218   --> $DIR/private-inferred-type.rs:128:17
219    |
220 LL |     let mut b = a;
221    |                 ^ private type
222
223 error: type `m::Priv` is private
224   --> $DIR/private-inferred-type.rs:129:9
225    |
226 LL |     b = a;
227    |         ^ private type
228
229 error: type `m::Priv` is private
230   --> $DIR/private-inferred-type.rs:130:11
231    |
232 LL |     match a {
233    |           ^ private type
234
235 error: aborting due to 33 previous errors
236
237 For more information about this error, try `rustc --explain E0446`.