pub static PUB_USE_OF_PRIVATE_EXTERN_CRATE: &Lint
Expand description
The pub_use_of_private_extern_crate
lint detects a specific
situation of re-exporting a private extern crate
.
Example
ⓘ
extern crate core;
pub use core as reexported_core;
{{produces}}
Explanation
A public use
declaration should not be used to publicly re-export a
private extern crate
. pub extern crate
should be used instead.
This was historically allowed, but is not the intended behavior according to the visibility rules. This is a future-incompatible lint to transition this to a hard error in the future. See issue #34537 for more details.