error: type `InternalError` is more private than the item `ApiError::InternalError::0`
  --> tests/ui/visibility/union_visibility_auto_pub_crate_boundary.rs:25:25
   |
25 |     pub enum ApiError = InternalError
   |                         ^^^^^^^^^^^^^ field `ApiError::InternalError::0` is reachable at visibility `pub`
   |
note: but type `InternalError` is only usable at visibility `pub(crate)`
  --> tests/ui/visibility/union_visibility_auto_pub_crate_boundary.rs:7:5
   |
 7 |     pub(crate) enum InternalError {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the lint level is defined here
  --> tests/ui/visibility/union_visibility_auto_pub_crate_boundary.rs:1:9
   |
 1 | #![deny(private_interfaces)]
   |         ^^^^^^^^^^^^^^^^^^
