rust/tests/ui/privacy/restricted/private-in-public.stderr
2023-01-11 09:32:08 +00:00

22 lines
656 B
Plaintext

error[E0446]: private type `Priv` in public interface
--> $DIR/private-in-public.rs:6:9
|
LL | struct Priv;
| ----------- `Priv` declared as private
...
LL | pub(crate) fn g(_: Priv) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
error[E0446]: private type `Priv` in public interface
--> $DIR/private-in-public.rs:7:9
|
LL | struct Priv;
| ----------- `Priv` declared as private
...
LL | pub(crate) fn h(_: Priv) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0446`.