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

rustdoc should hide private members in a const definition #113768

Closed
alexkazik opened this issue Jul 16, 2023 · 1 comment
Closed

rustdoc should hide private members in a const definition #113768

alexkazik opened this issue Jul 16, 2023 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@alexkazik
Copy link

When re-exporting a struct from another crate which has private fields and constant(s) then the "value" of the constants are printed in rustdoc.

Original documentation of the external crate (as expected):

pub const ZERO: Scientific = _

I tried this code:

pub use scientific::Scientific;

I expected to see this happen: same documentation as above.

Instead, this happened:

pub const ZERO: Scientific = Scientific{ inner: Sci::ZERO,}

The general privacy of const seemed to be fixed in #32735 but not this case.

Meta

rustc --version --verbose:

binary: rustc
commit-hash: 8ede3aae28fe6e4d52b38157d7bfe0d3bceef225
commit-date: 2023-07-12
host: aarch64-apple-darwin
release: 1.71.0
LLVM version: 16.0.5

rustc 1.73.0-nightly (33a2c2487 2023-07-12)
binary: rustc
commit-hash: 33a2c2487ac5d9927830ea4c1844335c6b9f77db
commit-date: 2023-07-12
host: aarch64-apple-darwin
release: 1.73.0-nightly
LLVM version: 16.0.5
@alexkazik alexkazik added the C-bug Category: This is a bug. label Jul 16, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 16, 2023
@fmease
Copy link
Member

fmease commented Jul 16, 2023

Dupe of #99630.

@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants