-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Listed in
Open
Copy link
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesL-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Tracking issue: #44663, RFC: rust-lang/rfcs#1977
Cargo.toml:
cargo-features = ["public-dependency"]
[package]
name = "playground"
version = "0.0.0"
edition = "2018"
[dependencies]
num-traits = "0.2"
lib.rs:
pub struct S;
impl std::ops::Add for S {
type Output = S;
fn add(self, _: Self) -> Self::Output {
unimplemented!()
}
}
impl num_traits::Zero for S {
fn zero() -> Self {
unimplemented!()
}
fn is_zero(&self) -> bool {
unimplemented!()
}
}
Also, a plain pub use
seems to be missed as well.
Kixunil and 0xangelo
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-visibilityArea: Visibility / privacyArea: Visibility / privacyC-bugCategory: This is a bug.Category: This is a bug.F-public_private_dependenciesfeature: public_private_dependenciesfeature: public_private_dependenciesL-exported_private_dependenciesLint: exported_private_dependenciesLint: exported_private_dependenciesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
epage commentedon Nov 30, 2023
This is still a problem and is much wider than this one case
What is linted today
What is missing
Some cases that might be worth trying:
Saturating
) as argument or return typesMy reproduction case:
foo/Cargo.toml
foo/src/lib.rs
Cargo.toml
src/lib.rs
epage commentedon Dec 4, 2023
Some other cases to validate as suggested by @obi1kenobi
(arguably this last one should lint regardless of the private deps because it's fishy in general, but that's just my opinion)
obi1kenobi commentedon Dec 4, 2023
To clarify, the opinions expressed above are mine (though possibly shared by @epage, I'm not sure) 😁
Sorry @epage, I should have posted this comment directly in this issue instead of just in a DM, and saved you from needing to copy-paste.
epage commentedon Jan 30, 2024
FYI @matthewjasper
exported_private_dependencies
lint #13417610 remaining items
mladedav commentedon Jul 16, 2025
There are some tests, I just want to make sure everything mentioned here really is tested. Even a reexport of an enum variant was already present (with a FIXME comment) so it might be just the rpitit test was missing.
We could maybe also add feature-gated tests for already implemented features. But I don't really know a lot of unstable features so I have no idea what should be tested. And I assume that's also out of scope of this issue as that wouldn't block stabilization?
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Unrolled build for #143856
exported_private_dependencies
cases #144082Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…
Rollup merge of rust-lang#144082 - mladedav:dm/pub-priv-tests, r=petr…
Rollup merge of rust-lang#144082 - mladedav:dm/pub-priv-tests, r=petr…
Rollup merge of rust-lang#144082 - mladedav:dm/pub-priv-tests, r=petr…
Unrolled build for #144082
Rollup merge of rust-lang#143856 - mladedav:dm/private-reexport, r=pe…