Tracking issue for future-incompatibility lint `pub_use_of_private_extern_crate`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
The pub_use_of_private_extern_crate lint detects a specific situation of re-exporting a private extern crate:
extern crate core;
pub use core as reexported_core;
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 used to be tracked as part of https://github.com/rust-lang/rust/issues/34537, but is only tangentially related so it got a new dedicated tracking issue.
Related PRs
- https://github.com/rust-lang/rust/pull/127656 tried to make this a hard error, but there were too many regressions, mostly because several ancient versions of
bitflagsare still in use.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the lint description and the related PR #127656, then review the linked crater report for the regressions that blocked making this a hard error. Done would require resolving the compatibility concerns and determining an acceptable path for enforcing the intended visibility rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100