E0446 Doesn't Trigger For Types In Private Modules #89264
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Declaring a public type and a public function in a private module, and then publicly reexporting the function doesn't trigger the E0446 error on using private types in public interfaces.
I expected to see the E0446 error, because the above code is semantically equivalent to this code, from a downstream crate's point of view.
Meta
This bug occurs both on Rust version
rustc 1.56.0-nightly (3d0774d0d 2021-08-18)
and versionrustc 1.54.0 (a178d0322 2021-07-26)
.The text was updated successfully, but these errors were encountered: