Skip to content

Tracking issue for future-incompatibility lint pub_use_of_private_extern_crate #127909

Open
@RalfJung

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

Related PRs

Metadata

Assignees

No one assigned

    Labels

    A-cratesArea: Crates and their interactions (like crate loading)A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyA-visibilityArea: Visibility / privacyC-future-incompatibilityCategory: Future-incompatibility lintsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions