Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for future-incompatibility lint pub_use_of_private_extern_crate #127909

Open
RalfJung opened this issue Jul 18, 2024 · 0 comments
Open
Labels
A-crates Area: Crates and their interactions (like crate loading) A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. A-resolve Area: Name resolution A-visibility Area: Visibility / privacy C-future-incompatibility Category: Future-incompatibility lints C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

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 #34537, but is only tangentially related so it got a new dedicated tracking issue.

Related PRs

@RalfJung RalfJung added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Jul 18, 2024
@fmease fmease changed the title Tracking issue for pub_use_of_private_extern_crate future-compatibility lint Tracking issue for future-incompatibility lint pub_use_of_private_extern_crate Sep 17, 2024
@fmease fmease added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. A-resolve Area: Name resolution A-visibility Area: Visibility / privacy C-future-incompatibility Category: Future-incompatibility lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. A-crates Area: Crates and their interactions (like crate loading) labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-crates Area: Crates and their interactions (like crate loading) A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. A-resolve Area: Name resolution A-visibility Area: Visibility / privacy C-future-incompatibility Category: Future-incompatibility lints C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants